diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index b22352c17fa..00000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,289 +0,0 @@ -// list of words used in command names used for word breaking -// sorted alphabetically for easy maintenance -const dictionary = [ - 'access', - 'activation', - 'activations', - 'adaptive', - 'administrative', - 'ai', - 'app', - 'application', - 'apply', - 'approve', - 'assessment', - 'assets', - 'assignment', - 'audit', - 'azure', - 'bin', - 'builder', - 'call', - 'card', - 'catalog', - 'checklist', - 'client', - 'comm', - 'command', - 'community', - 'container', - 'content', - 'conversation', - 'custom', - 'customizer', - 'dataverse', - 'default', - 'definition', - 'dev', - 'details', - 'directory', - 'eligibility', - 'enterprise', - 'entra', - 'event', - 'eventreceiver', - 'external', - 'externalize', - 'folder', - 'fun', - 'group', - 'groupify', - 'groupmembership', - 'guest', - 'health', - 'hide', - 'historical', - 'home', - 'hub', - 'in', - 'info', - 'inheritance', - 'init', - 'install', - 'installed', - 'is', - 'issue', - 'item', - 'label', - 'list', - 'link', - 'log', - 'login', - 'logout', - 'mailbox', - 'management', - 'member', - 'membership', - 'messaging', - 'model', - 'multitenant', - 'm365', - 'news', - 'oauth2', - 'office365', - 'one', - 'open', - 'ops', - 'org', - 'organization', - 'owner', - 'permission', - 'pim', - 'place', - 'policy', - 'profile', - 'pronouns', - 'property', - 'record', - 'records', - 'recycle', - 'registration', - 'request', - 'resolver', - 'retention', - 'revoke', - 'role', - 'room', - 'schema', - 'search', - 'sensitivity', - 'service', - 'session', - 'set', - 'setting', - 'settings', - 'setup', - 'sharing', - 'side', - 'site', - 'status', - 'storage', - 'table', - 'teams', - 'threat', - 'to', - 'todo', - 'token', - 'type', - 'unit', - 'url', - 'user', - 'value', - 'web', - 'webhook' -]; - -// list of words that should be capitalized in a specific way -const capitalized = [ - 'OAuth2' -]; - -// sort dictionary to put the longest words first -const sortedDictionary = dictionary.sort((a, b) => b.length - a.length); - -module.exports = { - "root": true, - "env": { - "node": true, - "es2021": true, - "commonjs": true, - "mocha": true - }, - "globals": { - "NodeJS": true - }, - "extends": [ - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2015, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "plugins": [ - "@typescript-eslint", - "cli-microsoft365", - "mocha" - ], - "ignorePatterns": [ - "**/package-generate/assets/**", - "**/test-projects/**", - "clientsidepages.ts", - "*.d.ts", - "*.js", - "*.cjs" - ], - "rules": { - "cli-microsoft365/correct-command-class-name": ["error", sortedDictionary, capitalized], - "cli-microsoft365/correct-command-name": "error", - "cli-microsoft365/no-by-server-relative-url-usage": "error", - "indent": "off", - "@typescript-eslint/indent": [ - "error", - 2 - ], - "semi": "off", - "@typescript-eslint/semi": [ - "error" - ], - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/explicit-module-boundary-types": [ - "error", - { - "allowArgumentsExplicitlyTypedAsAny": true - } - ], - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_" - } - ], - "brace-style": [ - "error", - "stroustrup", - { - "allowSingleLine": true - } - ], - "camelcase": [ - "error", - { - "allow": [ - "child_process", - "error_description", - "_Child_Items_", - "_Object_Type_", - "FN\\d+", - "OData__.*", - "vti_.*", - "Query.*", - "app_displayname", - "access_token", - "expires_on", - "extension_*" - ] - } - ], - "comma-dangle": [ - "error", - "never" - ], - "curly": [ - "error", - "all" - ], - "eqeqeq": [ - "error", - "always" - ], - "@typescript-eslint/naming-convention": [ - "error", - { - "selector": [ - "method" - ], - "format": [ - "camelCase" - ] - } - ], - "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }], - "mocha/no-identical-title": "error", - "@typescript-eslint/no-floating-promises": "error" - }, - "overrides": [ - { - "files": [ - "*.spec.ts" - ], - "rules": { - "no-console": "error", - "@typescript-eslint/no-empty-function": "off", - "cli-microsoft365/correct-command-class-name": "off", - "cli-microsoft365/correct-command-name": "off", - "@typescript-eslint/explicit-function-return-type": "off" - } - }, - { - "files": [ - "**/viva/commands/engage/**" - ], - "rules": { - "camelcase": "off" - } - }, - { - "files": [ - "*.mjs" - ], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off" - } - } - ] -}; diff --git a/.vscode/settings.json b/.vscode/settings.json index eaca2d951da..cc9d616bebf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,7 +19,7 @@ "[markdown][mdx]": { "files.insertFinalNewline": true }, - "[typescript]": { + "[javascript][typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features", "editor.formatOnSave": true } diff --git a/eslint-rules/lib/rules/correct-command-class-name.js b/eslint-rules/lib/rules/correct-command-class-name.js index 9dc6f60096b..7f2da6a004b 100644 --- a/eslint-rules/lib/rules/correct-command-class-name.js +++ b/eslint-rules/lib/rules/correct-command-class-name.js @@ -42,7 +42,7 @@ function capitalizeWord(word, capitalized) { return word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase(); } -function breakWords(longWord, dictionary) { +function breakWords(longWord, dictionary) { const words = []; for (let i = 0; i < dictionary.length; i++) { if (longWord.indexOf(dictionary[i]) === 0) { @@ -72,7 +72,23 @@ module.exports = { fixable: 'code', messages: { invalidName: "'{{ actualClassName }}' is not a valid command class name. Expected '{{ expectedClassName }}'" - } + }, + schema: [ + { + type: 'array', + items: { type: 'string' }, + uniqueItems: true, + title: 'dictionary', + description: 'List of known word parts used to break long command names into words.' + }, + { + type: 'array', + items: { type: 'string' }, + uniqueItems: true, + title: 'capitalized', + description: 'List of known word parts that should be capitalized.' + } + ] }, create: context => { return { diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000000..5c06fd069f3 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,270 @@ +import globals from 'globals'; +import js from '@eslint/js'; +import parser from '@typescript-eslint/parser'; +import tsPlugin from '@typescript-eslint/eslint-plugin'; +import mocha from 'eslint-plugin-mocha'; +import stylistic from '@stylistic/eslint-plugin'; +import cliM365 from './eslint-rules/lib/index.js'; + +// List of words used in command names used for word breaking +// Sorted alphabetically for easy maintenance +const dictionary = [ + 'access', + 'activation', + 'activations', + 'adaptive', + 'administrative', + 'ai', + 'app', + 'application', + 'apply', + 'approve', + 'assessment', + 'assets', + 'assignment', + 'audit', + 'azure', + 'bin', + 'builder', + 'call', + 'card', + 'catalog', + 'checklist', + 'client', + 'comm', + 'command', + 'community', + 'container', + 'content', + 'conversation', + 'custom', + 'customizer', + 'dataverse', + 'default', + 'definition', + 'dev', + 'details', + 'directory', + 'eligibility', + 'enterprise', + 'entra', + 'event', + 'eventreceiver', + 'external', + 'externalize', + 'folder', + 'fun', + 'group', + 'groupify', + 'groupmembership', + 'guest', + 'health', + 'hide', + 'historical', + 'home', + 'hub', + 'in', + 'info', + 'inheritance', + 'init', + 'install', + 'installed', + 'is', + 'issue', + 'item', + 'label', + 'list', + 'link', + 'log', + 'login', + 'logout', + 'mailbox', + 'management', + 'member', + 'membership', + 'messaging', + 'model', + 'multitenant', + 'm365', + 'news', + 'oauth2', + 'office365', + 'one', + 'open', + 'ops', + 'org', + 'organization', + 'owner', + 'permission', + 'pim', + 'place', + 'policy', + 'profile', + 'pronouns', + 'property', + 'record', + 'records', + 'recycle', + 'registration', + 'request', + 'resolver', + 'retention', + 'revoke', + 'role', + 'room', + 'schema', + 'search', + 'sensitivity', + 'service', + 'session', + 'set', + 'setting', + 'settings', + 'setup', + 'sharing', + 'side', + 'site', + 'status', + 'storage', + 'table', + 'teams', + 'threat', + 'to', + 'todo', + 'token', + 'type', + 'unit', + 'url', + 'user', + 'value', + 'web', + 'webhook' +]; + +// List of words that should be capitalized in a specific way +const capitalized = [ + 'OAuth2' +]; + +// Sort dictionary to put the longest words first +const sortedDictionary = dictionary.sort((a, b) => b.length - a.length); + +export default [ + // Ignored files + { + ignores: [ + "**/package-generate/assets/**", + "**/test-projects/**", + "clientsidepages.ts", + "**/*.d.ts", + "**/*.js", + "**/*.cjs" + ] + }, + // JS recommendations + js.configs.recommended, + { + plugins: { '@typescript-eslint': tsPlugin }, + rules: tsPlugin.configs.recommended.rules + }, + { + languageOptions: { + ecmaVersion: 2015, + sourceType: 'module', + parser: parser, + parserOptions: { + ecmaVersion: 2015, + sourceType: 'module', + project: './tsconfig.json' + }, + globals: { + ...globals.node, + ...globals.commonjs, + ...globals.es2021, + ...globals.mocha, + NodeJS: 'readonly' + } + }, + plugins: { + '@typescript-eslint': tsPlugin, + 'cli-microsoft365': cliM365, + '@stylistic': stylistic, + mocha + }, + rules: { + 'cli-microsoft365/correct-command-class-name': ['error', sortedDictionary, capitalized], + 'cli-microsoft365/correct-command-name': 'error', + 'cli-microsoft365/no-by-server-relative-url-usage': 'error', + '@stylistic/indent': ['error', 2], + '@stylistic/semi': ['error'], + '@stylistic/comma-dangle': ['error', 'never'], + '@stylistic/brace-style': [ + 'error', + 'stroustrup', + { allowSingleLine: true } + ], + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/explicit-module-boundary-types': [ + 'error', + { allowArgumentsExplicitlyTypedAsAny: true } + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_' } + ], + camelcase: ['error', { + allow: [ + 'child_process', + 'error_description', + '_Child_Items_', + '_Object_Type_', + 'FN\\d+', + 'OData__.*', + 'vti_.*', + 'Query.*', + 'app_displayname', + 'access_token', + 'expires_on', + 'extension_*' + ] + }], + curly: ['error', 'all'], + eqeqeq: ['error', 'always'], + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: ['method'], + format: ['camelCase'] + } + ], + '@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }], + 'mocha/no-identical-title': 'error', + '@typescript-eslint/no-floating-promises': 'error', + '@typescript-eslint/no-empty-function': 'error' + } + }, + { + files: ['**/*.spec.ts'], + rules: { + 'no-console': 'error', + '@typescript-eslint/no-empty-function': 'off', + 'cli-microsoft365/correct-command-class-name': 'off', + 'cli-microsoft365/correct-command-name': 'off' + } + }, + { + files: ['**/viva/commands/engage/**'], + rules: { + camelcase: 'off' + } + }, + { + files: ['**/*.mjs'], + rules: { + '@typescript-eslint/explicit-function-return-type': 'off' + } + } +]; \ No newline at end of file diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 2b8a9cc52f1..a82bdd9fc41 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -50,6 +50,7 @@ "devDependencies": { "@actions/core": "^1.11.1", "@microsoft/microsoft-graph-types": "^2.43.0", + "@stylistic/eslint-plugin": "^5.3.1", "@types/adm-zip": "^0.5.7", "@types/jmespath": "^0.15.2", "@types/json-schema": "^7.0.15", @@ -63,12 +64,12 @@ "@types/update-notifier": "^6.0.8", "@types/uuid": "^10.0.0", "@types/yargs-parser": "^21.0.3", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/eslint-plugin": "^8.42.0", + "@typescript-eslint/parser": "^8.42.0", "c8": "^10.1.3", - "eslint": "^8.57.1", + "eslint": "^9.34.0", "eslint-plugin-cli-microsoft365": "file:eslint-rules", - "eslint-plugin-mocha": "^10.5.0", + "eslint-plugin-mocha": "^11.1.0", "mocha": "^11.7.4", "rimraf": "^6.0.1", "sinon": "^21.0.0", @@ -519,17 +520,79 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -537,7 +600,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -554,6 +617,16 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -581,13 +654,40 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", + "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@fastify/busboy": { @@ -636,44 +736,28 @@ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", "license": "Apache-2.0" }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -690,13 +774,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@inquirer/ansi": { "version": "1.0.0", @@ -1951,6 +2041,53 @@ "node": ">=4" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.3.1.tgz", + "integrity": "sha512-Ykums1VYonM0TgkD0VteVq9mrlO2FhF48MDJnPyv3MktIB2ydtuhlO0AfWm7xnW1kyf5bjOqA6xc7JjviuVTxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/types": "^8.41.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@types/adm-zip": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.7.tgz", @@ -1989,6 +2126,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -2153,122 +2297,150 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.42.0.tgz", + "integrity": "sha512-Aq2dPqsQkxHOLfb2OPv43RnIvfj05nw8v/6n3B2NABIPpHnjQnaLo9QGMTvml+tv4korl/Cjfrb/BYhoL8UUTQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.42.0", + "@typescript-eslint/type-utils": "8.42.0", + "@typescript-eslint/utils": "8.42.0", + "@typescript-eslint/visitor-keys": "8.42.0", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.42.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.42.0.tgz", + "integrity": "sha512-r1XG74QgShUgXph1BYseJ+KZd17bKQib/yF3SR+demvytiRXrwd12Blnz5eYGm8tXaeRdd4x88MlfwldHoudGg==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.42.0", + "@typescript-eslint/types": "8.42.0", + "@typescript-eslint/typescript-estree": "8.42.0", + "@typescript-eslint/visitor-keys": "8.42.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.42.0.tgz", + "integrity": "sha512-vfVpLHAhbPjilrabtOSNcUDmBboQNrJUiNAGoImkZKnMjs2TIcWG33s4Ds0wY3/50aZmTMqJa6PiwkwezaAklg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.42.0", + "@typescript-eslint/types": "^8.42.0", + "debug": "^4.3.4" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.42.0.tgz", + "integrity": "sha512-51+x9o78NBAVgQzOPd17DkNTnIzJ8T/O2dmMBLoK9qbY0Gm52XJcdJcCl18ExBMiHo6jPMErUQWUv5RLE51zJw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.42.0", + "@typescript-eslint/visitor-keys": "8.42.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.42.0.tgz", + "integrity": "sha512-kHeFUOdwAJfUmYKjR3CLgZSglGHjbNTi1H8sTYRYV2xX6eNz4RyJ2LIgsDLKf8Yi0/GL1WZAC/DgZBeBft8QAQ==", + "dev": true, + "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.42.0.tgz", + "integrity": "sha512-9KChw92sbPTYVFw3JLRH1ockhyR3zqqn9lQXol3/YbI6jVxzWoGcT3AsAW0mu1MY0gYtsXnUGV/AKpkAj5tVlQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/types": "8.42.0", + "@typescript-eslint/typescript-estree": "8.42.0", + "@typescript-eslint/utils": "8.42.0", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.42.0.tgz", + "integrity": "sha512-LdtAWMiFmbRLNP7JNeY0SqEtJvGMYSzfiWBSmx+VSZ1CH+1zyl8Mmw1TT39OrtsRvIYShjJWzTDMPWZJCpwBlw==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -2276,75 +2448,89 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.42.0.tgz", + "integrity": "sha512-ku/uYtT4QXY8sl9EDJETD27o3Ewdi72hcXg1ah/kkUgBvAYHLwj2ofswFFNXS+FL5G+AGkxBtvGt8pFBHKlHsQ==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/project-service": "8.42.0", + "@typescript-eslint/tsconfig-utils": "8.42.0", + "@typescript-eslint/types": "8.42.0", + "@typescript-eslint/visitor-keys": "8.42.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.42.0.tgz", + "integrity": "sha512-JnIzu7H3RH5BrKC4NoZqRfmjqCIS1u3hGZltDYJgkVdqAezl4L9d1ZLw+36huCujtSBSAirGINF/S4UxOcR+/g==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.42.0", + "@typescript-eslint/types": "8.42.0", + "@typescript-eslint/typescript-estree": "8.42.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.42.0.tgz", + "integrity": "sha512-3WbiuzoEowaEn8RSnhJBrxSwX8ULYE9CXaPepS2C2W3NSA5NNIvBaslpBSBElPq0UGr0xVJlXFWOAKIkyylydQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.42.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@typespec/ts-http-runtime": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.2.3.tgz", @@ -2359,13 +2545,6 @@ "node": ">=18.0.0" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, "node_modules/@xmldom/xmldom": { "version": "0.9.8", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.8.tgz", @@ -2607,16 +2786,6 @@ "dev": true, "license": "Python-2.0" }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -3312,32 +3481,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dot-prop": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-9.0.0.tgz", @@ -3494,60 +3637,64 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz", + "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.34.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-plugin-cli-microsoft365": { @@ -3555,67 +3702,47 @@ "link": true }, "node_modules/eslint-plugin-mocha": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz", - "integrity": "sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-11.1.0.tgz", + "integrity": "sha512-rKntVWRsQFPbf8OkSgVNRVRrcVAPaGTyEgWCEyXaPDJkTl0v5/lwu1vTk5sWiUJU8l2sxwvGUZzSNrEKdVMeQw==", "dev": true, "license": "MIT", "dependencies": { - "eslint-utils": "^3.0.0", - "globals": "^13.24.0", - "rambda": "^7.4.0" - }, - "engines": { - "node": ">=14.0.0" + "@eslint-community/eslint-utils": "^4.4.1", + "globals": "^15.14.0" }, "peerDependencies": { - "eslint": ">=7.0.0" + "eslint": ">=9.0.0" } }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/eslint-plugin-mocha/node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { @@ -3659,6 +3786,29 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3673,18 +3823,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3887,16 +4050,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -3940,81 +4103,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flat-cache/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/flat-cache/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/flat-cache/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" + "keyv": "^4.5.4" }, "engines": { - "node": "*" - } - }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=16" } }, "node_modules/flatted": { @@ -4083,13 +4182,6 @@ "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", "license": "MIT" }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -4223,50 +4315,13 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4417,9 +4472,9 @@ } }, "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -4465,18 +4520,6 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -5348,16 +5391,6 @@ "node": ">=0.8.0" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/open": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", @@ -5486,16 +5519,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5535,16 +5558,6 @@ "dev": true, "license": "ISC" }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pg-int8": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", @@ -5748,13 +5761,6 @@ ], "license": "MIT" }, - "node_modules/rambda": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", - "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", - "dev": true, - "license": "MIT" - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -6167,16 +6173,6 @@ "url": "https://opencollective.com/sinon" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6416,13 +6412,6 @@ "node": ">=18" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6446,16 +6435,16 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/tslib": { @@ -6901,13 +6890,6 @@ "node": ">=8" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, "node_modules/wsl-utils": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", diff --git a/package.json b/package.json index 3a421eea376..17073e90763 100644 --- a/package.json +++ b/package.json @@ -297,6 +297,7 @@ "devDependencies": { "@actions/core": "^1.11.1", "@microsoft/microsoft-graph-types": "^2.43.0", + "@stylistic/eslint-plugin": "^5.3.1", "@types/adm-zip": "^0.5.7", "@types/jmespath": "^0.15.2", "@types/json-schema": "^7.0.15", @@ -310,12 +311,12 @@ "@types/update-notifier": "^6.0.8", "@types/uuid": "^10.0.0", "@types/yargs-parser": "^21.0.3", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/eslint-plugin": "^8.42.0", + "@typescript-eslint/parser": "^8.42.0", "c8": "^10.1.3", - "eslint": "^8.57.1", + "eslint": "^9.34.0", "eslint-plugin-cli-microsoft365": "file:eslint-rules", - "eslint-plugin-mocha": "^10.5.0", + "eslint-plugin-mocha": "^11.1.0", "mocha": "^11.7.4", "rimraf": "^6.0.1", "sinon": "^21.0.0", diff --git a/src/Auth.ts b/src/Auth.ts index 432aa8f77bd..406108692df 100644 --- a/src/Auth.ts +++ b/src/Auth.ts @@ -190,6 +190,7 @@ export class Auth { this._connection = Object.assign(this._connection, connection); } catch { + // Do nothing } } @@ -383,16 +384,18 @@ export class Auth { } private retrieveAuthCodeWithBrowser(resource: string, logger: Logger, debug: boolean): Promise { - return new Promise(async (resolve: (error: InteractiveAuthorizationCodeResponse) => void, reject: (error: InteractiveAuthorizationErrorResponse) => void): Promise => { + return new Promise((resolve: (error: InteractiveAuthorizationCodeResponse) => void, reject: (error: InteractiveAuthorizationErrorResponse) => void): void => { // _authServer is never set before hitting this line, but this check // is implemented so that we can support lazy loading // but also stub it for testing - /* c8 ignore next 3 */ - if (!this._authServer) { - this._authServer = (await import('./AuthServer.js')).default; - } + (async () => { + /* c8 ignore next 3 */ + if (!this._authServer) { + this._authServer = (await import('./AuthServer.js')).default; + } - (this._authServer as AuthServer).initializeServer(this.connection, resource, resolve, reject, logger, debug); + (this._authServer as AuthServer).initializeServer(this.connection, resource, resolve, reject, logger, debug); + })().catch(reject); }); } @@ -515,7 +518,7 @@ export class Auth { this.connection.thumbprint = await this.calculateThumbprint(pemCert); } } - catch (e) { + catch { this.connection.certificateType = CertificateType.Binary; } } diff --git a/src/Command.spec.ts b/src/Command.spec.ts index 2eb44d2c4c5..0a62b6e1ceb 100644 --- a/src/Command.spec.ts +++ b/src/Command.spec.ts @@ -55,12 +55,12 @@ class MockCommand1 extends Command { await this.showDeprecationWarning(logger, 'mc1', this.name); } - public trackUnknownOptionsPublic(telemetryProps: any, options: any) { - return this.trackUnknownOptions(telemetryProps, options); + public trackUnknownOptionsPublic(telemetryProps: any, options: any): void { + this.trackUnknownOptions(telemetryProps, options); } - public addUnknownOptionsToPayloadPublic(payload: any, options: any) { - return this.addUnknownOptionsToPayload(payload, options); + public addUnknownOptionsToPayloadPublic(payload: any, options: any): void { + this.addUnknownOptionsToPayload(payload, options); } } diff --git a/src/Command.ts b/src/Command.ts index 81301106854..66bc23357c1 100644 --- a/src/Command.ts +++ b/src/Command.ts @@ -361,7 +361,7 @@ export default abstract class Command { /* c8 ignore next 4 */ if (this.debug && typeof global.it === 'undefined') { const error = new Error(); - cli.error(error.stack).then(() => { }).catch(() => { }); + cli.error(error.stack).catch(() => undefined); } if (res.error) { @@ -406,7 +406,7 @@ export default abstract class Command { /* c8 ignore next 4 */ if (this.debug && typeof global.it === 'undefined') { const error = new Error(); - cli.error(error.stack).then(() => { }).catch(() => { }); + cli.error(error.stack).catch(() => undefined); } if (response.error && diff --git a/src/auth/msalCachePlugin.ts b/src/auth/msalCachePlugin.ts index 75891568ebd..48e99c04c96 100644 --- a/src/auth/msalCachePlugin.ts +++ b/src/auth/msalCachePlugin.ts @@ -10,7 +10,9 @@ class MsalCachePlugin implements ICachePlugin { const data: string = await this.fileTokenStorage.get(); tokenCacheContext.tokenCache.deserialize(data); } - catch { } + catch { + // Do nothing + } } public async afterCacheAccess(tokenCacheContext: TokenCacheContext): Promise { @@ -21,7 +23,9 @@ class MsalCachePlugin implements ICachePlugin { try { await this.fileTokenStorage.set(tokenCacheContext.tokenCache.serialize()); } - catch { } + catch { + // Do nothing + } } } diff --git a/src/autocomplete.ts b/src/autocomplete.ts index a274aff6284..d5c9493b75e 100644 --- a/src/autocomplete.ts +++ b/src/autocomplete.ts @@ -25,7 +25,9 @@ class Autocomplete { const data: string = fs.readFileSync(Autocomplete.autocompleteFilePath, 'utf-8'); this.commands = JSON.parse(data); } - catch { } + catch { + // Do nothing + } } this.omelette = omelette('m365_comp|m365|microsoft365'); @@ -70,7 +72,9 @@ class Autocomplete { replies = Object.keys(replies); } } - catch { } + catch { + // Do nothing + } } if (!replies) { diff --git a/src/chili/chili.ts b/src/chili/chili.ts index 889da6fa5a3..51f4294854b 100644 --- a/src/chili/chili.ts +++ b/src/chili/chili.ts @@ -142,10 +142,11 @@ async function runConversationTurn(conversationId: number, question: string): Pr const result = await prompt.forSelection({ message: 'What would you like to do next?', choices }); switch (result) { - case 'ask': + case 'ask': { const prompt = await promptForPrompt(); await runConversationTurn(conversationId, prompt); break; + } case 'end': await endConversation(conversationId); console.log(''); diff --git a/src/cli/cli.spec.ts b/src/cli/cli.spec.ts index 487863bc863..336983ac8a8 100644 --- a/src/cli/cli.spec.ts +++ b/src/cli/cli.spec.ts @@ -1399,8 +1399,7 @@ describe('cli', () => { }); it('formats a simple object as csv', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "value2item1" }; @@ -1410,8 +1409,7 @@ describe('cli', () => { }); it('does not produce headers when csvHeader config is set to false ', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "value2item1" }; @@ -1428,8 +1426,7 @@ describe('cli', () => { }); it('quotes all non-empty fields even if not required when csvQuoted config is set to true', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "value2item1" }; @@ -1446,8 +1443,7 @@ describe('cli', () => { }); it('quotes all empty fields if csvQuotedEmpty config is set to true', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "" }; @@ -1464,8 +1460,7 @@ describe('cli', () => { }); it('quotes all fields with character set in csvQuote config', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "value2item1" }; @@ -1592,24 +1587,22 @@ describe('cli', () => { }); it('formats object with array as md', async () => { - const input = - [{ - "header1": "value1item1", - "header2": "value2item1" - }, - { - "header1": "value1item2", - "header2": "value2item2" - } - ]; + const input = [{ + "header1": "value1item1", + "header2": "value2item1" + }, + { + "header1": "value1item2", + "header2": "value2item2" + } + ]; const actual = await cli.formatOutput(mockCommand, input, { output: 'md' }); const match = actual.match(/^## /gm); assert.strictEqual(match, null); }); it('formats a simple object as md', async () => { - const input = - { + const input = { "header1": "value1item1", "header2": "value2item1" }; @@ -1853,7 +1846,7 @@ describe('cli', () => { await cli.closeWithError(new CommandError('Error'), { options: { output: 'json' } }); assert.fail(`Didn't fail while expected`); } - catch (err) { + catch { assert(cliErrorStub.calledWith(JSON.stringify({ error: 'Error' }))); } }); diff --git a/src/cli/cli.ts b/src/cli/cli.ts index 99645ed9878..efd4ea60932 100644 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -422,7 +422,7 @@ async function loadOptionsFromContext(commandOptions: CommandOptionInfo[], debug m365rc = JSON.parse(fileContents); } } - catch (e) { + catch { await cli.closeWithError(`Error parsing ${filePath}`, { options: {} }); /* c8 ignore next */ } @@ -473,7 +473,9 @@ async function loadCommandFromFile(commandFileUrl: string): Promise { cli.commandToExecute = cli.getCommandInfo(command.default, commandFileUrl, commandInfo?.help); } } - catch { } + catch { + // Do nothing + } } function getCommandInfo(command: Command, filePath: string = '', helpFilePath: string = ''): CommandInfo { diff --git a/src/config.ts b/src/config.ts index a6d9a09b9ef..0cda3d93475 100644 --- a/src/config.ts +++ b/src/config.ts @@ -65,7 +65,6 @@ export default { 'https://microsoft.sharepoint-df.com/User.ReadWrite.All' ], applicationName: `CLI for Microsoft 365 v${app.packageJson().version}`, - delimiter: 'm365\$', configstoreName: 'cli-m365-config', minimalScopes: [ 'https://graph.microsoft.com/User.Read' diff --git a/src/m365/adaptivecard/commands/adaptivecard-send.ts b/src/m365/adaptivecard/commands/adaptivecard-send.ts index 08c3cef5b18..60e5c191cd6 100644 --- a/src/m365/adaptivecard/commands/adaptivecard-send.ts +++ b/src/m365/adaptivecard/commands/adaptivecard-send.ts @@ -51,7 +51,7 @@ class AdaptiveCardSendCommand extends AnonymousCommand { JSON.parse(options.card); return true; } - catch (e) { + catch { return false; } } @@ -66,7 +66,7 @@ class AdaptiveCardSendCommand extends AnonymousCommand { JSON.parse(options.cardData); return true; } - catch (e) { + catch { return false; } } diff --git a/src/m365/app/commands/permission/permission-list.ts b/src/m365/app/commands/permission/permission-list.ts index 293a718a27d..8323fa8d052 100644 --- a/src/m365/app/commands/permission/permission-list.ts +++ b/src/m365/app/commands/permission/permission-list.ts @@ -89,7 +89,7 @@ class AppPermissionListCommand extends AppCommand { const permissionsPromises = []; switch (mode) { - case GetServicePrincipal.withPermissions: + case GetServicePrincipal.withPermissions: { const appRoleAssignmentsRequestOptions: CliRequestOptions = { url: `${this.resource}/v1.0/servicePrincipals/${servicePrincipal.id}/appRoleAssignments`, headers: { @@ -109,7 +109,8 @@ class AppPermissionListCommand extends AppCommand { request.get<{ value: OAuth2PermissionGrant[] }>(oauth2PermissionGrantsRequestOptions) ]); break; - case GetServicePrincipal.withPermissionDefinitions: + } + case GetServicePrincipal.withPermissionDefinitions: { const oauth2PermissionScopesRequestOptions: CliRequestOptions = { url: `${this.resource}/v1.0/servicePrincipals/${servicePrincipal.id}/oauth2PermissionScopes`, headers: { @@ -129,6 +130,7 @@ class AppPermissionListCommand extends AppCommand { request.get<{ value: AppRole[] }>(appRolesRequestOptions) ]); break; + } } const permissions = await Promise.all(permissionsPromises); diff --git a/src/m365/base/ContextCommand.spec.ts b/src/m365/base/ContextCommand.spec.ts index 982a7167471..d9e3e5de366 100644 --- a/src/m365/base/ContextCommand.spec.ts +++ b/src/m365/base/ContextCommand.spec.ts @@ -16,7 +16,7 @@ class MockCommand extends ContextCommand { return 'Mock command'; } - public mockSaveContextInfo(contextInfo: Hash) { + public mockSaveContextInfo(contextInfo: Hash): void { this.saveContextInfo(contextInfo); } diff --git a/src/m365/commands/setup.ts b/src/m365/commands/setup.ts index 18ceec90516..b08fa990c63 100644 --- a/src/m365/commands/setup.ts +++ b/src/m365/commands/setup.ts @@ -159,7 +159,7 @@ class SetupCommand extends AnonymousCommand { }; preferences.entraApp = await cli.promptForSelection(entraAppConfig); switch (preferences.entraApp) { - case EntraAppConfig.Create: + case EntraAppConfig.Create: { const newEntraAppScopesConfig: SelectionConfig = { message: 'What scopes should the new app registration have?', choices: [ @@ -169,10 +169,12 @@ class SetupCommand extends AnonymousCommand { }; preferences.newEntraAppScopes = await cli.promptForSelection(newEntraAppScopesConfig); break; - case EntraAppConfig.UseExisting: + } + case EntraAppConfig.UseExisting: { const existingApp = await this.configureExistingEntraApp(logger); Object.assign(preferences, existingApp); break; + } } } else { @@ -418,7 +420,7 @@ class SetupCommand extends AnonymousCommand { logger: Logger }): Promise { switch (preferences.entraApp) { - case EntraAppConfig.Create: + case EntraAppConfig.Create: { if (this.verbose) { await logger.logToStderr('Creating a new Entra app...'); } @@ -432,6 +434,7 @@ class SetupCommand extends AnonymousCommand { cli.getConfig().delete(settingsNames.clientCertificateBase64Encoded); cli.getConfig().delete(settingsNames.clientCertificatePassword); break; + } case EntraAppConfig.UseExisting: Object.assign(settings, { clientId: preferences.clientId, diff --git a/src/m365/entra/commands/app/app-permission-list.mock.ts b/src/m365/entra/commands/app/app-permission-list.mock.ts index 66ff6f6bec3..e26e62350b7 100644 --- a/src/m365/entra/commands/app/app-permission-list.mock.ts +++ b/src/m365/entra/commands/app/app-permission-list.mock.ts @@ -279,8 +279,7 @@ export const applicationWithUnknownPermissions = { }; // 5d72c3ba-e836-4be3-94fb-fa6057b1611b -export const graphApplication = -{ +export const graphApplication = { "value": [ { "allowedMemberTypes": [ @@ -385,8 +384,7 @@ export const graphApplication = }; // 6aac2819-1b16-4d85-be7b-4bc1d1a456a7 -export const spOnlineApplication = -{ +export const spOnlineApplication = { "value": [ { "allowedMemberTypes": [ @@ -4913,8 +4911,7 @@ export const spOnlineApplication = }; //5d72c3ba-e836-4be3-94fb-fa6057b1611b -export const graphOauth2PermissionScope = -{ +export const graphOauth2PermissionScope = { "value": [ { "adminConsentDescription": "Allows the app to read user profiles and to read basic site info on behalf of the signed-in user.", @@ -5100,8 +5097,7 @@ export const graphOauth2PermissionScope = }; // 6aac2819-1b16-4d85-be7b-4bc1d1a456a7 -export const spOnlineOauth2PermissionScope = -{ +export const spOnlineOauth2PermissionScope = { "value": [ { "adminConsentDescription": "Allows the app to read access reviews, reviewers, decisions and settings that the signed-in user has access to in the organization.", diff --git a/src/m365/entra/commands/app/app-role-add.ts b/src/m365/entra/commands/app/app-role-add.ts index a888820e5c9..e22ee6e2937 100644 --- a/src/m365/entra/commands/app/app-role-add.ts +++ b/src/m365/entra/commands/app/app-role-add.ts @@ -81,7 +81,7 @@ class EntraAppRoleAddCommand extends GraphCommand { return 'Claim must not begin with .'; } - if (!/^[\w:!#$%&'()*+,-.\/:;<=>?@\[\]^+_`{|}~]+$/.test(claim)) { + if (!/^[\w:!#$%&'()*+,-./:;<=>?@[\]^+_`{|}~]+$/.test(claim)) { return `Claim can contain only the following characters a-z, A-Z, 0-9, :!#$%&'()*+,-./:;<=>?@[]^+_\`{|}~]+`; } @@ -143,7 +143,7 @@ class EntraAppRoleAddCommand extends GraphCommand { const { appObjectId, appId, appName } = args.options; if (this.verbose) { - await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appObjectId ? appObjectId : (appId ? appId : appName) }...`); + await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appObjectId ? appObjectId : (appId ? appId : appName)}...`); } if (appObjectId) { diff --git a/src/m365/entra/commands/approleassignment/approleassignment-list.spec.ts b/src/m365/entra/commands/approleassignment/approleassignment-list.spec.ts index 331c5ea6738..0ada242c656 100644 --- a/src/m365/entra/commands/approleassignment/approleassignment-list.spec.ts +++ b/src/m365/entra/commands/approleassignment/approleassignment-list.spec.ts @@ -361,7 +361,7 @@ class InternalRequestStub { } class RequestStub { - static retrieveAppRoles = (async (opts: any) => { + static retrieveAppRoles = (async (opts: any): Promise => { // we need to fake three calls: // 1. query the service principal endpoint based on input parameters // 2. get the service principal for the assigned resource(s) diff --git a/src/m365/entra/commands/group/group-add.ts b/src/m365/entra/commands/group/group-add.ts index 2b9fc26792a..64aabf07076 100644 --- a/src/m365/entra/commands/group/group-add.ts +++ b/src/m365/entra/commands/group/group-add.ts @@ -87,7 +87,7 @@ class EntraGroupAddCommand extends GraphCommand { if (args.options.mailNickname) { if (!validation.isValidMailNickname(args.options.mailNickname)) { - return `Value for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \ [] " ; : <> , SPACE.`; + return `Value for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \\ [] " ; : <> , SPACE.`; } if (args.options.mailNickname.length > 64) { diff --git a/src/m365/entra/commands/group/group-set.ts b/src/m365/entra/commands/group/group-set.ts index d2359c6c5c0..eb3ed2ba743 100644 --- a/src/m365/entra/commands/group/group-set.ts +++ b/src/m365/entra/commands/group/group-set.ts @@ -119,7 +119,7 @@ class EntraGroupSetCommand extends GraphCommand { if (args.options.mailNickname) { if (!validation.isValidMailNickname(args.options.mailNickname)) { - return `Value '${args.options.mailNickname}' for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \ [] " ; : <> , SPACE.`; + return `Value '${args.options.mailNickname}' for option 'mailNickname' must contain only characters in the ASCII character set 0-127 except the following: @ () \\ [] " ; : <> , SPACE.`; } if (args.options.mailNickname.length > 64) { diff --git a/src/m365/entra/commands/m365group/m365group-add.ts b/src/m365/entra/commands/m365group/m365group-add.ts index c8d25956e40..645c0efcc8e 100644 --- a/src/m365/entra/commands/m365group/m365group-add.ts +++ b/src/m365/entra/commands/m365group/m365group-add.ts @@ -282,7 +282,6 @@ class EntraM365GroupAddCommand extends GraphCommand { let promises: Promise<{ value: User[] }>[] = []; let userIds: string[] = []; - // eslint-disable-next-line @typescript-eslint/no-floating-promises promises = userArr.map(user => { const requestOptions: CliRequestOptions = { url: `${this.resource}/v1.0/users?$filter=userPrincipalName eq '${formatting.encodeQueryParameter(user)}'&$select=id,userPrincipalName`, diff --git a/src/m365/external/commands/connection/connection-get.spec.ts b/src/m365/external/commands/connection/connection-get.spec.ts index 725698b1c85..46f115009f6 100644 --- a/src/m365/external/commands/connection/connection-get.spec.ts +++ b/src/m365/external/commands/connection/connection-get.spec.ts @@ -17,8 +17,7 @@ describe(commands.CONNECTION_GET, () => { let logger: Logger; let loggerLogSpy: sinon.SinonSpy; - const externalConnection: ExternalConnectors.ExternalConnection = - { + const externalConnection: ExternalConnectors.ExternalConnection = { "id": "contosohr", "name": "Contoso HR", "description": "Connection to index Contoso HR system", diff --git a/src/m365/file/commands/convert/convert-pdf.ts b/src/m365/file/commands/convert/convert-pdf.ts index eb982f12828..17010be74e7 100644 --- a/src/m365/file/commands/convert/convert-pdf.ts +++ b/src/m365/file/commands/convert/convert-pdf.ts @@ -120,12 +120,7 @@ class FileConvertPdfCommand extends GraphCommand { await logger.logToStderr(`Deleting the temporary PDF file at ${localTargetFilePath}...`); } - try { - fs.unlinkSync(localTargetFilePath); - } - catch (e) { - throw e; - } + fs.unlinkSync(localTargetFilePath); } else { if (this.debug) { diff --git a/src/m365/file/commands/file-copy.spec.ts b/src/m365/file/commands/file-copy.spec.ts index b14617fc6e1..a967d8cccfc 100644 --- a/src/m365/file/commands/file-copy.spec.ts +++ b/src/m365/file/commands/file-copy.spec.ts @@ -19,7 +19,7 @@ describe(commands.COPY, () => { let logger: Logger; let commandInfo: CommandInfo; - const defaultPostStub = () => { + const defaultPostStub = (): sinon.SinonStub => { return sinon.stub(request, 'post').callsFake(async (opts) => { const url: string = opts.url as string; @@ -28,7 +28,7 @@ describe(commands.COPY, () => { url === 'https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,ea49a393-e3e6-4760-a1b2-e96539e15372,66e2861c-96d9-4418-a75c-0ed1bca68b42/drives/b!k6NJ6ubjYEehsullOeFTchyG4mbZlhhEp1wO0bymi0KkhVdx52mJQ5y68EfLYQYU/items/01YNDLPYN6Y2GOVW7725BZO354PWSELRRZ/copy?@microsoft.graph.conflictBehavior=replace' || url === 'https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,ea49a393-e3e6-4760-a1b2-e96539e15372,66e2861c-96d9-4418-a75c-0ed1bca68b42/drives/b!k6NJ6ubjYEehsullOeFTchyG4mbZlhhEp1wO0bymi0KkhVdx52mJQ5y68EfLYQYU/items/01YNDLPYN6Y2GOVW7725BZO354PWSELRRZ/copy?@microsoft.graph.conflictBehavior=rename' ) { - return Promise.resolve({ response: { status: 202 } }); + return { response: { status: 202 } }; } throw 'Invalid request'; @@ -68,10 +68,6 @@ describe(commands.COPY, () => { return { "id": "01YNDLPYN6Y2GOVW7725BZO354PWSELRRZ" }; - case 'https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/teams/finance?$select=id': - return { - "id": "01YNDLPYN6Y2GOVW7725BZO354PWSELRRZ" - }; case 'https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,ea49a393-e3e6-4760-a1b2-e96539e15372,66e2861c-96d9-4418-a75c-0ed1bca68b42/drives?$select=webUrl,id': return { "value": [ diff --git a/src/m365/file/commands/file-move.spec.ts b/src/m365/file/commands/file-move.spec.ts index 78350de8932..dc93308f238 100644 --- a/src/m365/file/commands/file-move.spec.ts +++ b/src/m365/file/commands/file-move.spec.ts @@ -19,7 +19,7 @@ describe(commands.MOVE, () => { let logger: Logger; let commandInfo: CommandInfo; - const defaultPostStub = () => { + const defaultPostStub = (): sinon.SinonStub => { return sinon.stub(request, 'post').callsFake(async (opts) => { const url: string = opts.url as string; @@ -51,7 +51,7 @@ describe(commands.MOVE, () => { }); }; - const defaultPatchStub = () => { + const defaultPatchStub = (): sinon.SinonStub => { return sinon.stub(request, 'patch').callsFake(async (opts) => { const url: string = opts.url as string; @@ -154,7 +154,7 @@ describe(commands.MOVE, () => { }); }; - const defaultDeleteStub = () => { + const defaultDeleteStub = (): sinon.SinonStub => { return sinon.stub(request, 'delete').callsFake(async (opts) => { const url: string = opts.url as string; diff --git a/src/m365/flow/commands/flow-export.spec.ts b/src/m365/flow/commands/flow-export.spec.ts index 185a7988166..125b5a3cfd1 100644 --- a/src/m365/flow/commands/flow-export.spec.ts +++ b/src/m365/flow/commands/flow-export.spec.ts @@ -32,7 +32,7 @@ describe(commands.EXPORT, () => { const foundEnvironmentId = 'Default-cf409f12-a06f-426e-9955-20f5d7a31dd3'; const nonZipFileFlowId = '694d21e4-49be-4e19-987b-074889e45c75'; - const postFakes = async (opts: CliRequestOptions) => { + const postFakes = async (opts: CliRequestOptions): Promise => { if (opts.url === `https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/environments/${formatting.encodeQueryParameter(notFoundEnvironmentId)}/listPackageResources?api-version=2016-11-01`) { throw { "error": { @@ -79,7 +79,7 @@ describe(commands.EXPORT, () => { throw 'Invalid request'; }; - const getFakes = async (opts: CliRequestOptions) => { + const getFakes = async (opts: CliRequestOptions): Promise => { if (opts.url === `https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/environments/${formatting.encodeQueryParameter(notFoundEnvironmentId)}/exportPackage?api-version=2016-11-01`) { throw { "error": { @@ -96,7 +96,7 @@ describe(commands.EXPORT, () => { }] }; } - if (opts.url!.match(/\/flows\/[^\?]+\?api-version\=2016-11-01/i)) { + if (opts.url!.match(/\/flows\/[^?]+\?api-version=2016-11-01/i)) { return { "id": `/providers/Microsoft.ProcessSimple/environments/${foundEnvironmentId}/flows/${foundFlowName}`, "name": `${foundFlowName}`, @@ -111,7 +111,7 @@ describe(commands.EXPORT, () => { throw 'Invalid request'; }; - const writeFileSyncFake = () => { }; + const writeFileSyncFake = (): void => { }; before(() => { sinon.stub(auth, 'restoreAuth').resolves(); @@ -199,7 +199,7 @@ describe(commands.EXPORT, () => { it('exports the specified flow in json format with illegal characters', async () => { sinon.stub(request, 'get').callsFake(async (opts: any) => { - if (opts.url.match(/\/flows\/[^\?]+\?api-version\=2016-11-01/i)) { + if (opts.url.match(/\/flows\/[^?]+\?api-version=2016-11-01/i)) { return { id: `/providers/Microsoft.ProcessSimple/environments/${foundEnvironmentId}/flows/${foundFlowName}`, name: `${foundFlowName}`, diff --git a/src/m365/flow/commands/flow-export.ts b/src/m365/flow/commands/flow-export.ts index 0bd3e8d51ae..f57cdc1a9e9 100644 --- a/src/m365/flow/commands/flow-export.ts +++ b/src/m365/flow/commands/flow-export.ts @@ -177,9 +177,12 @@ class FlowExportCommand extends PowerPlatformCommand { // adds suggestedCreationType property to all resources // see https://github.com/pnp/cli-microsoft365/issues/1845 Object.keys(res.resources).forEach((key) => { - res.resources[key].type === 'Microsoft.Flow/flows' - ? res.resources[key].suggestedCreationType = 'Update' - : res.resources[key].suggestedCreationType = 'Existing'; + if (res.resources[key].type === 'Microsoft.Flow/flows') { + res.resources[key].suggestedCreationType = 'Update'; + } + else { + res.resources[key].suggestedCreationType = 'Existing'; + } }); requestOptions.data = { @@ -203,10 +206,10 @@ class FlowExportCommand extends PowerPlatformCommand { } const downloadFileUrl: string = formatArgument === 'json' ? '' : res.packageLink.value; - const filenameRegEx: RegExp = /([^\/]+\.zip)/i; + const filenameRegEx: RegExp = /([^/]+\.zip)/i; filenameFromApi = formatArgument === 'json' ? `${res.properties.displayName}.json` : (filenameRegEx.exec(downloadFileUrl) || ['output.zip'])[0]; // Replace all illegal characters from the file name - const illegalCharsRegEx = /[\\\/:*?"<>|]/g; + const illegalCharsRegEx = /[\\/:*?"<>|]/g; filenameFromApi = filenameFromApi.replace(illegalCharsRegEx, '_'); if (this.verbose) { diff --git a/src/m365/flow/commands/run/run-get.ts b/src/m365/flow/commands/run/run-get.ts index 999cec6054b..740e3f441a8 100644 --- a/src/m365/flow/commands/run/run-get.ts +++ b/src/m365/flow/commands/run/run-get.ts @@ -157,7 +157,7 @@ class FlowRunGetCommand extends PowerAutomateCommand { res.triggerInformation = await this.getTriggerInformation(res); } - if (!!args.options.withActions) { + if (args.options.withActions) { res.actions = await this.getActionsInformation(res, args.options.withActions); } @@ -180,11 +180,11 @@ class FlowRunGetCommand extends PowerAutomateCommand { if (!res.properties.actions[action] || (chosenActions && chosenActions.indexOf(action) === -1)) { continue; } actionsResult[action] = res.properties.actions[action]; - if (!!res.properties.actions[action].inputsLink?.uri) { + if (res.properties.actions[action].inputsLink?.uri) { actionsResult[action].input = await this.requestAdditionalInformation(res.properties.actions[action].inputsLink?.uri); } - if (!!res.properties.actions[action].outputsLink?.uri) { + if (res.properties.actions[action].outputsLink?.uri) { actionsResult[action].output = await this.requestAdditionalInformation(res.properties.actions[action].outputsLink?.uri); } } diff --git a/src/m365/graph/commands/schemaextension/schemaextension-set.ts b/src/m365/graph/commands/schemaextension/schemaextension-set.ts index c4748b4ea42..ea066a5af52 100644 --- a/src/m365/graph/commands/schemaextension/schemaextension-set.ts +++ b/src/m365/graph/commands/schemaextension/schemaextension-set.ts @@ -175,7 +175,7 @@ class GraphSchemaExtensionSetCommand extends GraphCommand { try { properties = JSON.parse(propertiesString); } - catch (e) { + catch { return 'The specified properties is not a valid JSON string'; } diff --git a/src/m365/onedrive/commands/onedrive-list.spec.ts b/src/m365/onedrive/commands/onedrive-list.spec.ts index af04a7a5e58..95329806d51 100644 --- a/src/m365/onedrive/commands/onedrive-list.spec.ts +++ b/src/m365/onedrive/commands/onedrive-list.spec.ts @@ -109,10 +109,10 @@ describe(commands.LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -126,10 +126,10 @@ describe(commands.LIST, () => { await command.action(logger, { options: commandOptionsSchema.parse({}) }); assert(loggerLogSpy.calledWith([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -151,10 +151,10 @@ describe(commands.LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -168,10 +168,10 @@ describe(commands.LIST, () => { await command.action(logger, { options: commandOptionsSchema.parse({ debug: true }) }); assert(loggerLogSpy.calledWith([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -193,10 +193,10 @@ describe(commands.LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": "SPSiteQuery,841cb9d7-61a2-4029-b405-8cef77f591e2,924a239d-6416-49ff-86e2-0283b03bc4aa,0f820ed9-1927-4d48-8f88-94f863949574", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -217,10 +217,10 @@ describe(commands.LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -234,16 +234,16 @@ describe(commands.LIST, () => { await command.action(logger, { options: commandOptionsSchema.parse({}) }); assert(loggerLogSpy.calledWith([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,15,517)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fcontoso-my.sharepoint.com%2fpersonal%2fjohn_doe_contoso_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,15,517)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "lidiah@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Lidia Holloway", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002flidiah_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "\/Date(2021,3,1,16,45,44,240)\/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "\/Guid(00000000-0000-0000-0000-000000000000)\/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "2d63d39f-3016-0000-a532-30514e76ae73|908bed80-a04a-4433-b4a0-883d9847d110:d23a1d52-e19a-4bc5-be17-463a24e17fa2\nSiteProperties\nhttps%3a%2f%2fdev365-my.sharepoint.com%2fpersonal%2fdiegos_dev365_onmicrosoft_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AnonymousLinkExpirationInDays": 0, "AuthContextStrength": null, "AverageResourceUsage": 0, "BlockDownloadLinksFileType": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DefaultLinkPermission": 0, "DefaultLinkToExistingAccess": false, "DefaultLinkToExistingAccessReset": false, "DefaultSharingLinkType": 0, "DenyAddAndCustomizePages": 2, "Description": null, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "ExternalUserExpirationInDays": 0, "GroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "GroupOwnerLoginName": null, "HasHolds": false, "HubSiteId": "/Guid(00000000-0000-0000-0000-000000000000)/", "IBMode": null, "IBSegments": [], "IBSegmentsToAdd": null, "IBSegmentsToRemove": null, "IsGroupOwnerSiteAdmin": false, "IsHubSite": false, "LastContentModifiedDate": "/Date(2021,3,1,16,45,44,240)/", "Lcid": 1033, "LimitedAccessFileType": 0, "LockIssue": null, "LockState": "Unlock", "OverrideBlockUserInfoVisibility": 0, "OverrideTenantAnonymousLinkExpirationPolicy": false, "OverrideTenantExternalUserExpirationPolicy": false, "Owner": "diegos@dev365.onmicrosoft.com", "OwnerEmail": null, "OwnerLoginName": null, "OwnerName": null, "PWAEnabled": 1, "RelatedGroupId": "/Guid(00000000-0000-0000-0000-000000000000)/", "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SensitivityLabel": "/Guid(00000000-0000-0000-0000-000000000000)/", "SensitivityLabel2": null, "SetOwnerWithoutUpdatingSecondaryAdmin": false, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 2, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 2, "SocialBarOnSitePagesDisabled": false, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 943718, "Template": "SPSPERS#10", "TimeZoneId": 13, "Title": "Diego Siciliani", "Url": "https:\u002f\u002fdev365-my.sharepoint.com\u002fpersonal\u002fdiegos_dev365_onmicrosoft_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); diff --git a/src/m365/pa/commands/app/app-export.ts b/src/m365/pa/commands/app/app-export.ts index f3e2d3cbc66..03f93fce233 100644 --- a/src/m365/pa/commands/app/app-export.ts +++ b/src/m365/pa/commands/app/app-export.ts @@ -108,7 +108,7 @@ class PaAppExportCommand extends PowerPlatformCommand { let filename = args.options.name; if (args.options.packageDisplayName) { //Replace all illegal characters from the file name - const illegalCharsRegEx = /[\\\/:*?"<>|]/g; + const illegalCharsRegEx = /[\\/:*?"<>|]/g; filename = args.options.packageDisplayName.replace(illegalCharsRegEx, '_'); } diff --git a/src/m365/pa/commands/app/app-get.ts b/src/m365/pa/commands/app/app-get.ts index b364faaac11..00dfeea4de5 100644 --- a/src/m365/pa/commands/app/app-get.ts +++ b/src/m365/pa/commands/app/app-get.ts @@ -126,7 +126,7 @@ class PaAppGetCommand extends PowerAppsCommand { return a.properties.displayName.toLowerCase() === `${args.options.displayName}`.toLowerCase(); }); - if (!!app) { + if (app) { await logger.log(this.setProperties(app)); } else { diff --git a/src/m365/pp/commands/solution/solution-publisher-get.ts b/src/m365/pp/commands/solution/solution-publisher-get.ts index 2b2a7168f9a..eabb77d9bbc 100644 --- a/src/m365/pp/commands/solution/solution-publisher-get.ts +++ b/src/m365/pp/commands/solution/solution-publisher-get.ts @@ -108,7 +108,7 @@ class PpSolutionPublisherGetCommand extends PowerPlatformCommand { return result; } - requestOptions.url = `${dynamicsApiUrl}/api/data/v9.0/publishers?$filter=friendlyname eq \'${args.options.name}\'&$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix&api-version=9.1`; + requestOptions.url = `${dynamicsApiUrl}/api/data/v9.0/publishers?$filter=friendlyname eq '${args.options.name}'&$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix&api-version=9.1`; const result = await request.get<{ value: Publisher[] }>(requestOptions); if (result.value.length === 0) { diff --git a/src/m365/spfx/commands/package/package-generate.spec.ts b/src/m365/spfx/commands/package/package-generate.spec.ts index d4f5af5eacf..e83906b9308 100644 --- a/src/m365/spfx/commands/package/package-generate.spec.ts +++ b/src/m365/spfx/commands/package/package-generate.spec.ts @@ -32,7 +32,7 @@ describe(commands.PACKAGE_GENERATE, () => { sinon.stub(session, 'getId').returns(''); (command as any).archive = admZipMock; commandInfo = cli.getCommandInfo(command); - cli.getConfig; + cli.getConfig(); }); beforeEach(() => { diff --git a/src/m365/spfx/commands/package/package-generate.ts b/src/m365/spfx/commands/package/package-generate.ts index 07a07c6aff2..8fb172720d4 100644 --- a/src/m365/spfx/commands/package/package-generate.ts +++ b/src/m365/spfx/commands/package/package-generate.ts @@ -209,6 +209,7 @@ class SpfxPackageGenerateCommand extends AnonymousCommand { error = err.message; } finally { + /* eslint-disable no-unsafe-finally */ try { if (tmpDir) { if (this.verbose) { @@ -227,11 +228,12 @@ class SpfxPackageGenerateCommand extends AnonymousCommand { throw `An error has occurred while removing the temp folder at ${tmpDir}. Please remove it manually.`; } + /* eslint-enable no-unsafe-finally */ } } private static replaceTokens(s: string, tokens: any): string { - return s.replace(/\$([^\$]+)\$/g, (substring: string, token: string): string => { + return s.replace(/\$([^$]+)\$/g, (substring: string, token: string): string => { if (tokens[token]) { return tokens[token]; } diff --git a/src/m365/spfx/commands/project/base-project-command.ts b/src/m365/spfx/commands/project/base-project-command.ts index bc9c8d5cba4..5ae64f3e7aa 100644 --- a/src/m365/spfx/commands/project/base-project-command.ts +++ b/src/m365/spfx/commands/project/base-project-command.ts @@ -22,7 +22,9 @@ export abstract class BaseProjectCommand extends AnonymousCommand { source: fs.readFileSync(gitignorePath, 'utf-8') }; } - catch { } + catch { + // Do nothing + } } const npmignorePath: string = path.join(projectRootPath, '.npmignore'); @@ -32,7 +34,9 @@ export abstract class BaseProjectCommand extends AnonymousCommand { source: fs.readFileSync(npmignorePath, 'utf-8') }; } - catch { } + catch { + // Do nothing + } } this.readAndParseJsonFile(path.join(projectRootPath, 'config', 'config.json'), project, 'configJson'); @@ -126,7 +130,9 @@ export abstract class BaseProjectCommand extends AnonymousCommand { } } } - catch { } + catch { + // Do nothing + } } const packageJsonPath: string = path.resolve(this.projectRootPath as string, 'package.json'); @@ -136,10 +142,12 @@ export abstract class BaseProjectCommand extends AnonymousCommand { packageJson.dependencies && packageJson.dependencies['@microsoft/sp-core-library']) { const coreLibVersion: string = packageJson.dependencies['@microsoft/sp-core-library']; - return coreLibVersion.replace(/[^0-9\.]/g, ''); + return coreLibVersion.replace(/[^0-9.]/g, ''); } } - catch { } + catch { + // Do nothing + } return undefined; } diff --git a/src/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.ts b/src/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.ts index 6da1f4e6001..490b04e333c 100644 --- a/src/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.ts +++ b/src/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.ts @@ -72,7 +72,7 @@ export class FN021007_PKG_only_one_rush_stack_compiler_installed extends JsonRul return; } - const match = /@microsoft\/rush-stack-compiler[^\/]+/.exec(tsConfigExtends); + const match = /@microsoft\/rush-stack-compiler[^/]+/.exec(tsConfigExtends); if (!match) { return; } diff --git a/src/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.ts b/src/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.ts index 64d61785dfb..2b15269a972 100644 --- a/src/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.ts +++ b/src/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.ts @@ -66,7 +66,7 @@ export class PnPJsRule extends BasicDependencyRule { fileEdits.push(...files.map(x => ({ action: "add", path: x, - targetValue: 'require(\"tslib\");' + targetValue: 'require("tslib");' } as FileEdit))); } @@ -89,9 +89,11 @@ export class PnPJsRule extends BasicDependencyRule { ...moduleConfiguration, path: `https://unpkg.com/${moduleConfiguration.key}@${version}/dist/${moduleName.replace('@pnp/', '')}.es5.umd${moduleName === '@pnp/common' || moduleName === ' @pnp/pnpjs' ? '.bundle' : ''}.min.js` }); - moduleConfiguration.globalDependencies && moduleConfiguration.globalDependencies.forEach(dependency => { - result.push(...this.getModuleAndParents(project, `@${dependency.replace('/', '.')}`)); - }); + if (moduleConfiguration.globalDependencies) { + moduleConfiguration.globalDependencies.forEach(dependency => { + result.push(...this.getModuleAndParents(project, `@${dependency.replace('/', '.')}`)); + }); + } } } diff --git a/src/m365/spfx/commands/project/project-model/ScssFile.ts b/src/m365/spfx/commands/project/project-model/ScssFile.ts index 3c7fafb6892..5a8ac19ae80 100644 --- a/src/m365/spfx/commands/project/project-model/ScssFile.ts +++ b/src/m365/spfx/commands/project/project-model/ScssFile.ts @@ -7,7 +7,9 @@ export class ScssFile { try { this._source = fs.readFileSync(this.path, 'utf-8'); } - catch { } + catch { + // Do nothing + } } return this._source; diff --git a/src/m365/spfx/commands/project/project-model/TsFile.spec.ts b/src/m365/spfx/commands/project/project-model/TsFile.spec.ts index 4f76c5bf3bb..d8a6f8d06d4 100644 --- a/src/m365/spfx/commands/project/project-model/TsFile.spec.ts +++ b/src/m365/spfx/commands/project/project-model/TsFile.spec.ts @@ -22,6 +22,7 @@ describe('TsFile', () => { it('doesn\'t throw exception if the specified file doesn\'t exist', () => { sinon.stub(fs, 'existsSync').callsFake(() => false); + // eslint-disable-next-line @typescript-eslint/no-unused-expressions tsFile.source; assert(true); }); diff --git a/src/m365/spfx/commands/project/project-model/TsFile.ts b/src/m365/spfx/commands/project/project-model/TsFile.ts index d37e239bb53..02616c42a7a 100644 --- a/src/m365/spfx/commands/project/project-model/TsFile.ts +++ b/src/m365/spfx/commands/project/project-model/TsFile.ts @@ -14,7 +14,9 @@ export class TsFile { try { this._sourceFile = tsUtil.createSourceFile(path.basename(this.path), this.source, ts.ScriptTarget.Latest, true); } - catch { } + catch { + // Do nothing + } } return this._sourceFile; @@ -39,7 +41,9 @@ export class TsFile { try { this._source = fs.readFileSync(this.path, 'utf-8'); } - catch { } + catch { + // Do nothing + } } return this._source; diff --git a/src/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.ts b/src/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.ts index 966fbb6f56e..1d35b8520da 100644 --- a/src/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.ts +++ b/src/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.ts @@ -353,7 +353,7 @@ export default [ // STANDARDIZED BY: eslint\\conf\\eslint-recommended.js 'no-with': 2, // RATIONALE: Makes logic easier to understand, since constants always have a known value - // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js + // @typescript-eslint\\eslint-plugin\\dist\\configs\\eslint-recommended.js 'prefer-const': 1, // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused. 'promise/param-names': 2, diff --git a/src/m365/spfx/commands/spfx-doctor.ts b/src/m365/spfx/commands/spfx-doctor.ts index c36f99d3d43..59f19dde7be 100644 --- a/src/m365/spfx/commands/spfx-doctor.ts +++ b/src/m365/spfx/commands/spfx-doctor.ts @@ -1058,13 +1058,13 @@ class SpfxDoctorCommand extends BaseProjectCommand { } } - private getPackageVersionFromNpm(args: string[]): Promise { - return new Promise(async (resolve: (version: string) => void, reject: (error: string) => void): Promise => { - const packageName: string = args[1]; + private async getPackageVersionFromNpm(args: string[]): Promise { + if (this.debug) { + await this.logger.logToStderr(`Executing npm: ${args.join(' ')}...`); + } - if (this.debug) { - await this.logger.logToStderr(`Executing npm: ${args.join(' ')}...`); - } + return new Promise((resolve: (version: string) => void, reject: (error: string) => void) => { + const packageName: string = args[1]; child_process.exec(`npm ${args.join(' ')}`, (err: child_process.ExecException | null, stdout: string): void => { if (err) { diff --git a/src/m365/spo/commands/contenttype/contenttype-field-remove.spec.ts b/src/m365/spo/commands/contenttype/contenttype-field-remove.spec.ts index 2043932c1ed..345c8946ade 100644 --- a/src/m365/spo/commands/contenttype/contenttype-field-remove.spec.ts +++ b/src/m365/spo/commands/contenttype/contenttype-field-remove.spec.ts @@ -32,7 +32,7 @@ describe(commands.CONTENTTYPE_FIELD_REMOVE, () => { let commandInfo: CommandInfo; let promptIssued: boolean = false; - const getStubCalls = async (opts: any) => { + const getStubCalls = async (opts: any): Promise<{ Id: string }> => { if ((opts.url as string).indexOf(`_api/site?$select=Id`) > -1) { return { "Id": SITE_ID }; } @@ -48,7 +48,7 @@ describe(commands.CONTENTTYPE_FIELD_REMOVE, () => { throw 'Invalid request'; }; - const postStubSuccCalls = async (opts: any) => { + const postStubSuccCalls = async (opts: any): Promise => { if ((opts.url as string).indexOf(`/_vti_bin/client.svc/ProcessQuery`) > -1) { // Web CT if (opts.data.toLowerCase() === `false{${FIELD_LINK_ID}}`.toLowerCase()) { @@ -87,7 +87,7 @@ describe(commands.CONTENTTYPE_FIELD_REMOVE, () => { throw 'Invalid request'; }; - const postStubFailedCalls = async (opts: any) => { + const postStubFailedCalls = async (opts: any): Promise => { if ((opts.url as string).indexOf(`/_vti_bin/client.svc/ProcessQuery`) > -1) { // WEB CT if (opts.data === `false{${FIELD_LINK_ID}}`) { diff --git a/src/m365/spo/commands/contenttypehub/contenttypehub-get.spec.ts b/src/m365/spo/commands/contenttypehub/contenttypehub-get.spec.ts index 54e22b4c7c4..da4f6bcf037 100644 --- a/src/m365/spo/commands/contenttypehub/contenttypehub-get.spec.ts +++ b/src/m365/spo/commands/contenttypehub/contenttypehub-get.spec.ts @@ -95,7 +95,7 @@ describe(commands.CONTENTTYPEHUB_GET, () => { }; await command.action(logger, { options: options } as any); - const bodyPayload = `\n\n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n\n`; + const bodyPayload = `\n\n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n\n`; assert.strictEqual(requestStub.lastCall.args[0].data, bodyPayload); assert(loggerLogSpy.calledWith({ "ContentTypePublishingHub": "https:\\u002f\\u002fcontoso.sharepoint.com\\u002fsites\\u002fcontentTypeHub" })); }); diff --git a/src/m365/spo/commands/externaluser/externaluser-list.spec.ts b/src/m365/spo/commands/externaluser/externaluser-list.spec.ts index 15bd32f3a78..5bcf55f321c 100644 --- a/src/m365/spo/commands/externaluser/externaluser-list.spec.ts +++ b/src/m365/spo/commands/externaluser/externaluser-list.spec.ts @@ -88,7 +88,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -124,7 +124,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -160,7 +160,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -196,7 +196,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -232,7 +232,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -268,7 +268,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -304,7 +304,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -340,7 +340,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -376,7 +376,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -412,7 +412,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -448,7 +448,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -484,7 +484,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "\/Date(2016,10,2,21,50,52,0)\/", "InvitedBy": null + "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": "Dear Vesa", "InvitedAs": "me@dearvesa.fi", "UniqueId": "100300009BF10C95", "AcceptedAs": "me@dearvesa.fi", "WhenCreated": "/Date(2016,10,2,21,50,52,0)/", "InvitedBy": null } ] } @@ -520,7 +520,7 @@ describe(commands.EXTERNALUSER_LIST, () => { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.GetExternalUsersResults", "TotalUserCount": 1, "UserCollectionPosition": -1, "ExternalUserCollection": { "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUserCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantManagement.ExternalUser", "DisplayName": " { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/field/field-remove.spec.ts b/src/m365/spo/commands/field/field-remove.spec.ts index 0b1da8c2e01..98860bf1959 100644 --- a/src/m365/spo/commands/field/field-remove.spec.ts +++ b/src/m365/spo/commands/field/field-remove.spec.ts @@ -192,7 +192,7 @@ describe(commands.FIELD_REMOVE, () => { sinon.stub(cli, 'promptForConfirmation').resolves(true); const getStub = sinon.stub(request, 'get').callsFake(async (opts) => { - if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web/GetList(\'%2Fsites%2Fportal%2FLists%2FEvents\')/fields`) { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web/GetList('%2Fsites%2Fportal%2FLists%2FEvents')/fields`) { return { 'value': [{ 'Id': '03e45e84-1992-4d42-9116-26f756012634', diff --git a/src/m365/spo/commands/file/file-add.spec.ts b/src/m365/spo/commands/file/file-add.spec.ts index a5910173f51..6e571a89765 100644 --- a/src/m365/spo/commands/file/file-add.spec.ts +++ b/src/m365/spo/commands/file/file-add.spec.ts @@ -186,7 +186,7 @@ describe(commands.FILE_ADD, () => { }); }; - const stubFs = () => { + const stubFs = (): void => { sinon.stub(fs, 'readFileSync').returns(Buffer.from('abc')); sinon.stub(fs, 'statSync').returns({ size: 1234 } as any); sinon.stub(fs, 'openSync').returns(3); @@ -264,7 +264,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -282,7 +282,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true } })); @@ -299,7 +299,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true, debug: true } @@ -317,7 +317,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true, debug: true } @@ -335,7 +335,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'abc', debug: true } @@ -353,7 +353,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'abc', debug: true } @@ -370,7 +370,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: folderServerRelativePath, - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'abc', debug: true } @@ -405,7 +405,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'abc', debug: true } @@ -423,7 +423,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'Picture', debug: true } @@ -441,7 +441,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'Picture', debug: true } @@ -459,7 +459,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true, checkInComment: 'abc', debug: true @@ -478,7 +478,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', approve: true, verbose: true, debug: true @@ -497,7 +497,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', publish: true, verbose: true, debug: true @@ -516,7 +516,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', publish: true } }), new CommandError('The file cannot be published without approval. Moderation for this list is enabled. Use the --approve option instead of --publish to approve and publish the file')); @@ -531,7 +531,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'Picture', Title: 'abc', publish: true, @@ -559,7 +559,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -579,7 +579,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -620,7 +620,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -639,7 +639,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -650,7 +650,7 @@ describe(commands.FILE_ADD, () => { stubGetResponses(); stubPostResponses(); - sinonUtil.restore([fs.statSync, fs.openSync, , fs.readSync, , fs.closeSync]); + sinonUtil.restore([fs.statSync, fs.openSync, fs.readSync, fs.closeSync]); sinon.stub(fs, 'statSync').returns({ size: 251 * 1024 * 1024 } as any); // 250 MB sinon.stub(fs, 'openSync').returns(3); sinon.stub(fs, 'readSync').throws(new Error('readSync error')); @@ -660,7 +660,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', debug: true, verbose: true } @@ -676,7 +676,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'Picture', Title: 'abc', publish: true @@ -724,7 +724,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', contentType: 'Picture', Title: 'abc', Folder: 'Folder', @@ -742,7 +742,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', approve: true } }); @@ -758,7 +758,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true } }); @@ -777,7 +777,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true, debug: true, verbose: true @@ -797,7 +797,7 @@ describe(commands.FILE_ADD, () => { options: { webUrl: 'https://contoso.sharepoint.com/sites/project-x', folder: 'Shared%20Documents/t1', - path: 'C:\Users\Velin\Desktop\MS365.jpg', + path: 'C:\\Users\\Velin\\Desktop\\MS365.jpg', checkOut: true } }), new CommandError(expectedFileAddError)); diff --git a/src/m365/spo/commands/file/file-add.ts b/src/m365/spo/commands/file/file-add.ts index 5f218bd81fc..0421d226866 100644 --- a/src/m365/spo/commands/file/file-add.ts +++ b/src/m365/spo/commands/file/file-add.ts @@ -191,7 +191,7 @@ class SpoFileAddCommand extends SpoCommand { }; await request.get(requestOptions); } - catch (err: any) { + catch { // folder does not exist so will attempt to create the folder tree await spo.ensureFolder(args.options.webUrl, folderPath, logger, this.verbose); } @@ -494,7 +494,9 @@ class SpoFileAddCommand extends SpoCommand { fs.closeSync(fd); /* c8 ignore next */ } - catch { } + catch { + // Do nothing + } } if (--info.RetriesLeft > 0) { diff --git a/src/m365/spo/commands/file/file-checkin.spec.ts b/src/m365/spo/commands/file/file-checkin.spec.ts index e795f8ba3b0..13f09b66e1a 100644 --- a/src/m365/spo/commands/file/file-checkin.spec.ts +++ b/src/m365/spo/commands/file/file-checkin.spec.ts @@ -234,7 +234,7 @@ describe(commands.FILE_CHECKIN, () => { type: 'minor' } }); - assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById(\'0CD891EF-AFCE-4E55-B836-FCE03286CCCF\')/checkin(comment='',checkintype=0)"); + assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById('0CD891EF-AFCE-4E55-B836-FCE03286CCCF')/checkin(comment='',checkintype=0)"); }); it('should call correctly the API when type is overwrite (id)', async () => { @@ -247,7 +247,7 @@ describe(commands.FILE_CHECKIN, () => { type: 'overwrite' } }); - assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById(\'0CD891EF-AFCE-4E55-B836-FCE03286CCCF\')/checkin(comment='',checkintype=2)"); + assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById('0CD891EF-AFCE-4E55-B836-FCE03286CCCF')/checkin(comment='',checkintype=2)"); }); it('should call correctly the API when comment specified (id)', async () => { @@ -260,7 +260,7 @@ describe(commands.FILE_CHECKIN, () => { comment: 'abc1' } }); - assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById(\'0CD891EF-AFCE-4E55-B836-FCE03286CCCF\')/checkin(comment='abc1',checkintype=1)"); + assert.strictEqual(postStub.lastCall.args[0].url, "https://contoso.sharepoint.com/sites/project-x/_api/web/GetFileById('0CD891EF-AFCE-4E55-B836-FCE03286CCCF')/checkin(comment='abc1',checkintype=1)"); }); it('fails validation if the webUrl option is not a valid SharePoint site URL', async () => { diff --git a/src/m365/spo/commands/file/file-checkin.ts b/src/m365/spo/commands/file/file-checkin.ts index 4792021c570..9edbe0394d4 100644 --- a/src/m365/spo/commands/file/file-checkin.ts +++ b/src/m365/spo/commands/file/file-checkin.ts @@ -22,7 +22,7 @@ interface Options extends GlobalOptions { enum CheckinType { Minor = 0, Major = 1, - Overwrite = 2, + Overwrite = 2 } class SpoFileCheckinCommand extends SpoCommand { diff --git a/src/m365/spo/commands/file/file-list.spec.ts b/src/m365/spo/commands/file/file-list.spec.ts index 160ff477a47..b20c6fe64bc 100644 --- a/src/m365/spo/commands/file/file-list.spec.ts +++ b/src/m365/spo/commands/file/file-list.spec.ts @@ -23,7 +23,7 @@ describe(commands.FILE_LIST, () => { CheckOutType: 2, ContentTag: '{F09C4EFE-B8C0-4E89-A166-03418661B89B},9,12', CustomizedPageStatus: 0, - ETag: '\"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9\"', + ETag: '"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9"', Exists: true, IrmEnabled: false, Length: '331673', diff --git a/src/m365/spo/commands/file/file-rename.ts b/src/m365/spo/commands/file/file-rename.ts index 17b36efa05a..e9457799feb 100644 --- a/src/m365/spo/commands/file/file-rename.ts +++ b/src/m365/spo/commands/file/file-rename.ts @@ -151,12 +151,10 @@ class SpoFileRenameCommand extends SpoCommand { await cli.executeCommand(removeCommand as Command, { options: { ...removeOptions, _: [] } }); } catch (err: any) { - if (err.error !== undefined && err.error.message !== undefined && err.error.message.includes('does not exist')) { - - } - else { - throw err; + if (err?.error?.message?.includes('does not exist')) { + return; } + throw err; } } } diff --git a/src/m365/spo/commands/file/file-roleassignment-remove.spec.ts b/src/m365/spo/commands/file/file-roleassignment-remove.spec.ts index e9928e0dacb..bce3c929432 100644 --- a/src/m365/spo/commands/file/file-roleassignment-remove.spec.ts +++ b/src/m365/spo/commands/file/file-roleassignment-remove.spec.ts @@ -29,7 +29,7 @@ describe(commands.FILE_ROLEASSIGNMENT_REMOVE, () => { CheckOutType: 2, ContentTag: '{F09C4EFE-B8C0-4E89-A166-03418661B89B},9,12', CustomizedPageStatus: 0, - ETag: '\"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9\"', + ETag: '"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9"', Exists: true, IrmEnabled: false, Length: '331673', diff --git a/src/m365/spo/commands/file/file-roleinheritance-break.spec.ts b/src/m365/spo/commands/file/file-roleinheritance-break.spec.ts index 976848cc9cd..2244bacc5c6 100644 --- a/src/m365/spo/commands/file/file-roleinheritance-break.spec.ts +++ b/src/m365/spo/commands/file/file-roleinheritance-break.spec.ts @@ -29,7 +29,7 @@ describe(commands.FILE_ROLEINHERITANCE_BREAK, () => { CheckOutType: 2, ContentTag: '{F09C4EFE-B8C0-4E89-A166-03418661B89B},9,12', CustomizedPageStatus: 0, - ETag: '\"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9\"', + ETag: '"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9"', Exists: true, IrmEnabled: false, Length: '331673', diff --git a/src/m365/spo/commands/file/file-roleinheritance-reset.spec.ts b/src/m365/spo/commands/file/file-roleinheritance-reset.spec.ts index e135f7cd89c..a78f642c1e3 100644 --- a/src/m365/spo/commands/file/file-roleinheritance-reset.spec.ts +++ b/src/m365/spo/commands/file/file-roleinheritance-reset.spec.ts @@ -29,7 +29,7 @@ describe(commands.FILE_ROLEINHERITANCE_RESET, () => { CheckOutType: 2, ContentTag: '{F09C4EFE-B8C0-4E89-A166-03418661B89B},9,12', CustomizedPageStatus: 0, - ETag: '\"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9\"', + ETag: '"{F09C4EFE-B8C0-4E89-A166-03418661B89B},9"', Exists: true, IrmEnabled: false, Length: '331673', diff --git a/src/m365/spo/commands/folder/FolderColor.ts b/src/m365/spo/commands/folder/FolderColor.ts index bd68ccdcf7e..849ffeb3df6 100644 --- a/src/m365/spo/commands/folder/FolderColor.ts +++ b/src/m365/spo/commands/folder/FolderColor.ts @@ -1,5 +1,4 @@ -export const FolderColorValues: { [key: string]: string } = -{ +export const FolderColorValues: { [key: string]: string } = { yellow: '0', darkRed: '1', darkOrange: '2', diff --git a/src/m365/spo/commands/folder/folder-get.spec.ts b/src/m365/spo/commands/folder/folder-get.spec.ts index 0a132eee763..21af6e76ebc 100644 --- a/src/m365/spo/commands/folder/folder-get.spec.ts +++ b/src/m365/spo/commands/folder/folder-get.spec.ts @@ -523,7 +523,7 @@ describe(commands.FOLDER_GET, () => { }); it('should show tip when root folder is used withPermissions', async () => { - const error = "Please ensure the specified folder URL or folder Id does not refer to a root folder. Use \'spo list get\' with withPermissions instead."; + const error = "Please ensure the specified folder URL or folder Id does not refer to a root folder. Use 'spo list get' with withPermissions instead."; sinon.stub(request, 'get').callsFake(async opts => { if ((opts.url === `https://contoso.sharepoint.com/_api/web/GetFolderByServerRelativePath(DecodedUrl='%2FShared%20Documents')?$expand=ListItemAllFields/HasUniqueRoleAssignments,ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings`)) { diff --git a/src/m365/spo/commands/folder/folder-sharinglink-get.spec.ts b/src/m365/spo/commands/folder/folder-sharinglink-get.spec.ts index 55642779294..6e98fcf820b 100644 --- a/src/m365/spo/commands/folder/folder-sharinglink-get.spec.ts +++ b/src/m365/spo/commands/folder/folder-sharinglink-get.spec.ts @@ -48,8 +48,7 @@ describe(commands.FOLDER_SHARINGLINK_GET, () => { } }; - const getDriveResponse: any = - { + const getDriveResponse: any = { "id": driveId, "webUrl": `${webUrl}/Shared%20Documents` }; diff --git a/src/m365/spo/commands/group/group-member-remove.spec.ts b/src/m365/spo/commands/group/group-member-remove.spec.ts index e92e0b60069..e91ddeadcdb 100644 --- a/src/m365/spo/commands/group/group-member-remove.spec.ts +++ b/src/m365/spo/commands/group/group-member-remove.spec.ts @@ -29,13 +29,11 @@ describe(commands.GROUP_MEMBER_REMOVE, () => { const userId = 14; const spoGroupMemberListCommandOutput = `[{ "Id": 13, "IsHiddenInUI": false, "LoginName": "c:0t.c|tenant|4b468129-3b44-4414-bd45-aa5bde29df2f", "Title": "Microsoft Entra Security Group 2", "PrincipalType": 1, "Email": "", "Expiration": "", "IsEmailAuthenticationGuestUser": false, "IsShareByEmailGuestUser": false, "IsSiteAdmin": false, "UserId": null, "UserPrincipalName": null },{ "Id": 13, "IsHiddenInUI": false, "LoginName": "c:0t.c|tenant|3f10f4af-8704-4394-80c0-ee8cef5eae27", "Title": "Microsoft Entra Security Group", "PrincipalType": 1, "Email": "", "Expiration": "", "IsEmailAuthenticationGuestUser": false, "IsShareByEmailGuestUser": false, "IsSiteAdmin": false, "UserId": null, "UserPrincipalName": null }, { "Id": 17, "IsHiddenInUI": false, "LoginName": "c:0o.c|federateddirectoryclaimprovider|5786b8e8-c495-4734-b345-756733960730", "Title": "Office 365 Group", "PrincipalType": 4, "Email": "office365group@contoso.onmicrosoft.com", "Expiration": "", "IsEmailAuthenticationGuestUser": false, "IsShareByEmailGuestUser": false, "IsSiteAdmin": false, "UserId": null, "UserPrincipalName": null }]`; - const UserRemovalJSONResponse = - { + const UserRemovalJSONResponse = { "odata.null": true }; - const userInformation: any = - { + const userInformation: any = { businessPhones: [], displayName: "Alex Wilber", givenName: "Alex Wilber", diff --git a/src/m365/spo/commands/homesite/homesite-remove.spec.ts b/src/m365/spo/commands/homesite/homesite-remove.spec.ts index 59013bd7e6b..8176bb86831 100644 --- a/src/m365/spo/commands/homesite/homesite-remove.spec.ts +++ b/src/m365/spo/commands/homesite/homesite-remove.spec.ts @@ -153,7 +153,7 @@ describe(commands.HOMESITE_REMOVE, () => { await assert.rejects( command.action(logger, { options: { debug: true, force: true } } as any), - new CommandError('[Error ID: 03fc404e-0f70-4607-82e8-8fdb014e8658] The site with ID \"8e4686ed-b00c-4c5f-a0e2-4197081df5d5\" has not been added as a home site or Viva Connections. Check aka.ms/homesites for details.') + new CommandError('[Error ID: 03fc404e-0f70-4607-82e8-8fdb014e8658] The site with ID "8e4686ed-b00c-4c5f-a0e2-4197081df5d5" has not been added as a home site or Viva Connections. Check aka.ms/homesites for details.') ); }); }); diff --git a/src/m365/spo/commands/hubsite/hubsite-list.ts b/src/m365/spo/commands/hubsite/hubsite-list.ts index dd4875bcd0a..4d5e0852c45 100644 --- a/src/m365/spo/commands/hubsite/hubsite-list.ts +++ b/src/m365/spo/commands/hubsite/hubsite-list.ts @@ -125,7 +125,7 @@ class SpoHubSiteListCommand extends SpoCommand { await logger.logToStderr(`Retrieved ${res.Row.length} sites in batch ${batchNumber}`); } - if (!!res.NextHref) { + if (res.NextHref) { reqOptions.url = nonPagedUrl + res.NextHref; if (this.debug) { await logger.logToStderr(`Url for next batch of sites: ${reqOptions.url}`); diff --git a/src/m365/spo/commands/hubsite/hubsite-set.spec.ts b/src/m365/spo/commands/hubsite/hubsite-set.spec.ts index 6a06b363f04..0fb188ef495 100644 --- a/src/m365/spo/commands/hubsite/hubsite-set.spec.ts +++ b/src/m365/spo/commands/hubsite/hubsite-set.spec.ts @@ -85,7 +85,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "Description", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "Description", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -116,7 +116,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -147,7 +147,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -178,7 +178,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -209,7 +209,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "" } ]); } @@ -240,7 +240,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "Description", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "Description", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "" } ]); } @@ -271,7 +271,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "https:\u002f\u002fcontoso.com\u002flogo.png", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -302,7 +302,7 @@ describe(commands.HUBSITE_SET, () => { }, 36, { "IsNull": false }, 37, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "LogoUrl": "", "SiteId": "\/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)\/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.HubSiteProperties", "Description": "All things sales", "ID": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "LogoUrl": "", "SiteId": "/Guid(255a50b2-527f-4413-8485-57f4c17a24d1)/", "SiteUrl": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fSales", "Title": "Sales" } ]); } @@ -370,3 +370,4 @@ describe(commands.HUBSITE_SET, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/knowledgehub/knowledgehub-get.spec.ts b/src/m365/spo/commands/knowledgehub/knowledgehub-get.spec.ts index 0182e7dd23a..247afadf3fd 100644 --- a/src/m365/spo/commands/knowledgehub/knowledgehub-get.spec.ts +++ b/src/m365/spo/commands/knowledgehub/knowledgehub-get.spec.ts @@ -79,7 +79,7 @@ describe(commands.KNOWLEDGEHUB_GET, () => { opts.headers['X-RequestDigest'] && opts.data) { if (opts.data === ``) { - return JSON.stringify([{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.20516.12005", "ErrorInfo": null, "TraceCorrelationId": "1f527f9f-00b0-0000-5545-a8da6b2fb12e" }, 5, { "IsNull": false }, 6, "https:\/\/contoso.sharepoint.com\/sites\/knowledgesite"]); + return JSON.stringify([{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.20516.12005", "ErrorInfo": null, "TraceCorrelationId": "1f527f9f-00b0-0000-5545-a8da6b2fb12e" }, 5, { "IsNull": false }, 6, "https://contoso.sharepoint.com/sites/knowledgesite"]); } } } @@ -109,7 +109,7 @@ describe(commands.KNOWLEDGEHUB_GET, () => { opts.headers['X-RequestDigest'] && opts.data) { if (opts.data === ``) { - return JSON.stringify([{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.20516.12005", "ErrorInfo": null, "TraceCorrelationId": "1f527f9f-00b0-0000-5545-a8da6b2fb12e" }, 5, { "IsNull": false }, 6, "https:\/\/contoso.sharepoint.com\/sites\/knowledgesite"]); + return JSON.stringify([{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.20516.12005", "ErrorInfo": null, "TraceCorrelationId": "1f527f9f-00b0-0000-5545-a8da6b2fb12e" }, 5, { "IsNull": false }, 6, "https://contoso.sharepoint.com/sites/knowledgesite"]); } } } diff --git a/src/m365/spo/commands/list/list-contenttype-default-set.spec.ts b/src/m365/spo/commands/list/list-contenttype-default-set.spec.ts index 527d4b8f3e5..fb208ef5ca7 100644 --- a/src/m365/spo/commands/list/list-contenttype-default-set.spec.ts +++ b/src/m365/spo/commands/list/list-contenttype-default-set.spec.ts @@ -226,14 +226,14 @@ describe(commands.LIST_CONTENTTYPE_DEFAULT_SET, () => { it('configures specified visible content type as default. List specified using URL. UniqueContentTypeOrder not null', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { - if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList(\'%2Fsites%2Fdocuments\')/RootFolder`) { + if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList('%2Fsites%2Fdocuments')/RootFolder`) { return; } throw 'Invalid request'; }); sinon.stub(request, 'get').callsFake(async (opts) => { - if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList(\'%2Fsites%2Fdocuments\')/RootFolder?$select=ContentTypeOrder,UniqueContentTypeOrder`) { + if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList('%2Fsites%2Fdocuments')/RootFolder?$select=ContentTypeOrder,UniqueContentTypeOrder`) { return { "ContentTypeOrder": [ { @@ -254,7 +254,7 @@ describe(commands.LIST_CONTENTTYPE_DEFAULT_SET, () => { }; } - if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList(\'%2Fsites%2Fdocuments\')/ContentTypes?$select=Id`) { + if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList('%2Fsites%2Fdocuments')/ContentTypes?$select=Id`) { return { value: [ { diff --git a/src/m365/spo/commands/list/list-defaultvalue-clear.spec.ts b/src/m365/spo/commands/list/list-defaultvalue-clear.spec.ts index 0fc81146d7e..6d831abbeaf 100644 --- a/src/m365/spo/commands/list/list-defaultvalue-clear.spec.ts +++ b/src/m365/spo/commands/list/list-defaultvalue-clear.spec.ts @@ -32,7 +32,7 @@ describe(commands.LIST_DEFAULTVALUE_CLEAR, () => { const folderUrl = '/sites/marketing/Shared Documents/Logos'; const fieldName = 'DocumentType'; - const defaultColumnXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6General20;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5LogoTemplate`; + const defaultColumnXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6General20;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5LogoTemplate`; before(() => { sinon.stub(auth, 'restoreAuth').resolves(); @@ -216,7 +216,7 @@ describe(commands.LIST_DEFAULTVALUE_CLEAR, () => { }); await command.action(logger, { options: { webUrl: siteUrl, listId: listId, folderUrl: folderUrl, verbose: true, force: true } }); - const expectedXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6GeneralTemplate`; + const expectedXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6GeneralTemplate`; assert.deepStrictEqual(putStub.firstCall.args[0].data, expectedXml); }); @@ -239,7 +239,7 @@ describe(commands.LIST_DEFAULTVALUE_CLEAR, () => { }); await command.action(logger, { options: { webUrl: siteUrl, listTitle: listTitle, fieldName: fieldName, verbose: true, force: true } }); - const expectedXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c620;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5`; + const expectedXml = `19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c620;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5`; assert.deepStrictEqual(putStub.firstCall.args[0].data, expectedXml); }); diff --git a/src/m365/spo/commands/list/list-defaultvalue-list.spec.ts b/src/m365/spo/commands/list/list-defaultvalue-list.spec.ts index 5b474ef1bb3..7e74db4d3c2 100644 --- a/src/m365/spo/commands/list/list-defaultvalue-list.spec.ts +++ b/src/m365/spo/commands/list/list-defaultvalue-list.spec.ts @@ -24,16 +24,16 @@ describe(commands.LIST_DEFAULTVALUE_LIST, () => { const defaultColumnXml = ` - - 19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6 - General + + 19;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#18;#Croatia|59f1ab85-235b-4cf8-b669-4373cc9393c6 + General - - 20;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5 - Logo + + 20;#Canada|e3d25461-68ef-4070-8523-5ba439f6d4d5 + Logo - - Template + + Template `; diff --git a/src/m365/spo/commands/list/list-roleassignment-remove.spec.ts b/src/m365/spo/commands/list/list-roleassignment-remove.spec.ts index eeb1ef82622..a7ecb68163f 100644 --- a/src/m365/spo/commands/list/list-roleassignment-remove.spec.ts +++ b/src/m365/spo/commands/list/list-roleassignment-remove.spec.ts @@ -266,7 +266,7 @@ describe(commands.LIST_ROLEASSIGNMENT_REMOVE, () => { it('removes role assignment from list by url', async () => { const postStub = sinon.stub(request, 'post').callsFake(async (opts) => { - if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList(\'%2Fsites%2Fdocuments\')/roleassignments/removeroleassignment(principalid='11')`) { + if (opts.url === `https://contoso.sharepoint.com/_api/web/GetList('%2Fsites%2Fdocuments')/roleassignments/removeroleassignment(principalid='11')`) { return; } diff --git a/src/m365/spo/commands/list/list-set.spec.ts b/src/m365/spo/commands/list/list-set.spec.ts index 6db7573e2ca..1823b52aab7 100644 --- a/src/m365/spo/commands/list/list-set.spec.ts +++ b/src/m365/spo/commands/list/list-set.spec.ts @@ -67,7 +67,7 @@ describe(commands.LIST_SET, () => { const newTitle = 'List 1'; let actual = ''; sinon.stub(request, 'post').callsFake(async (opts) => { - if ((opts.url as string).indexOf(`_api/web/lists/getByTitle(\'Documents\')`) > -1) { + if ((opts.url as string).indexOf(`_api/web/lists/getByTitle('Documents')`) > -1) { actual = opts.data.Title; return { ErrorMessage: null }; } diff --git a/src/m365/spo/commands/list/list-sitescript-get.spec.ts b/src/m365/spo/commands/list/list-sitescript-get.spec.ts index 52ebd611591..8b4c373acfb 100644 --- a/src/m365/spo/commands/list/list-sitescript-get.spec.ts +++ b/src/m365/spo/commands/list/list-sitescript-get.spec.ts @@ -808,7 +808,7 @@ describe(commands.LIST_SITESCRIPT_GET, () => { }); sinon.stub(request, 'get').callsFake(async (opts) => { - if ((opts.url as string).indexOf(`https://contoso.sharepoint.com/sites/team1/_api/web/GetList(\'%2Fsites%2Fteam1%2FMyLibrary\')`) > -1) { + if ((opts.url as string).indexOf(`https://contoso.sharepoint.com/sites/team1/_api/web/GetList('%2Fsites%2Fteam1%2FMyLibrary')`) > -1) { return { "RootFolder": { "Exists": true, "IsWOPIEnabled": false, "ItemCount": 0, "Name": "MyLibrary", "ProgID": null, "ServerRelativeUrl": "/sites/team1/MyLibrary", "TimeCreated": "2019-01-11T10:03:19Z", "TimeLastModified": "2019-01-11T10:03:20Z", "UniqueId": "faaa6af2-0157-4e9a-a352-6165195923c8", "WelcomePage": "" }, "AllowContentTypes": true, "BaseTemplate": 101, "BaseType": 1, "ContentTypesEnabled": false, "CrawlNonDefaultViews": false, "Created": "2019-01-11T10:03:19Z", "CurrentChangeToken": { "StringValue": "1;3;fb4b0cf8-c006-4802-a1ea-57e0e4852188;636827981522200000;96826061" }, "CustomActionElements": { "Items": [{ "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "vwaViewAsWebAccessFromEcb", "EnabledScript": null, "ImageUrl": null, "Location": "EditControlBlock", "RegistrationId": "vdw", "RegistrationType": 4, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "View in Web Browser", "UrlAction": "~site/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "vwaViewAsWebAccessVsdxFromEcb", "EnabledScript": null, "ImageUrl": null, "Location": "EditControlBlock", "RegistrationId": "vsdx", "RegistrationType": 4, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "View in Web Browser", "UrlAction": "~site/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "vwaViewAsWebAccessVsdmFromEcb", "EnabledScript": null, "ImageUrl": null, "Location": "EditControlBlock", "RegistrationId": "vsdm", "RegistrationType": 4, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "View in Web Browser", "UrlAction": "~site/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "FormServerEcbItemOpenXsn", "EnabledScript": null, "ImageUrl": "/_layouts/15/images/icxddoc.gif?rev=45", "Location": "EditControlBlock", "RegistrationId": "xsn", "RegistrationType": 4, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "Edit in Browser", "UrlAction": "~site/_layouts/15/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser&Source={Source}" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "FormServerEcbItemOpenInfoPathDocument", "EnabledScript": null, "ImageUrl": "/_layouts/15/images/icxddoc.gif?rev=45", "Location": "EditControlBlock", "RegistrationId": "InfoPath.Document", "RegistrationType": 3, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "Edit in Browser", "UrlAction": "~site/_layouts/15/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser&Source={Source}" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "FormServerEcbItemOpenInfoPathDocument2", "EnabledScript": null, "ImageUrl": "/_layouts/15/images/icxddoc.gif?rev=45", "Location": "EditControlBlock", "RegistrationId": "InfoPath.Document.2", "RegistrationType": 3, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "Edit in Browser", "UrlAction": "~site/_layouts/15/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser&Source={Source}" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "FormServerEcbItemOpenInfoPathDocument3", "EnabledScript": null, "ImageUrl": "/_layouts/15/images/icxddoc.gif?rev=45", "Location": "EditControlBlock", "RegistrationId": "InfoPath.Document.3", "RegistrationType": 3, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "Edit in Browser", "UrlAction": "~site/_layouts/15/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser&Source={Source}" }, { "ClientSideComponentId": "00000000-0000-0000-0000-000000000000", "ClientSideComponentProperties": "", "CommandUIExtension": null, "Id": "FormServerEcbItemOpenInfoPathDocument4", "EnabledScript": null, "ImageUrl": "/_layouts/15/images/icxddoc.gif?rev=45", "Location": "EditControlBlock", "RegistrationId": "InfoPath.Document.4", "RegistrationType": 3, "RequireSiteAdministrator": false, "Rights": { "High": "0", "Low": "1" }, "Title": "Edit in Browser", "UrlAction": "~site/_layouts/15/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser&Source={Source}" }] }, "DefaultContentApprovalWorkflowId": "00000000-0000-0000-0000-000000000000", "DefaultItemOpenUseListSetting": false, "Description": "", "Direction": "none", "DisableCommenting": false, "DisableGridEditing": false, "DocumentTemplateUrl": "/sites/team1/MyLibrary/Forms/template.dotx", "DraftVersionVisibility": 0, "EnableAttachments": false, "EnableFolderCreation": true, "EnableMinorVersions": false, "EnableModeration": false, "EnableRequestSignOff": true, "EnableVersioning": true, "EntityTypeName": "MyLibrary", "ExemptFromBlockDownloadOfNonViewableFiles": false, "FileSavePostProcessingEnabled": false, "ForceCheckout": false, "HasExternalDataSource": false, "Hidden": false, "Id": "fb4b0cf8-c006-4802-a1ea-57e0e4852188", "ImagePath": { "DecodedUrl": "/_layouts/15/images/itdl.png?rev=45" }, "ImageUrl": "/_layouts/15/images/itdl.png?rev=45", "IrmEnabled": false, "IrmExpire": false, "IrmReject": false, "IsApplicationList": false, "IsCatalog": false, "IsPrivate": false, "ItemCount": 0, "LastItemDeletedDate": "2019-01-11T10:03:19Z", "LastItemModifiedDate": "2019-01-11T10:04:15Z", "LastItemUserModifiedDate": "2019-01-11T10:03:19Z", "ListExperienceOptions": 0, "ListItemEntityTypeFullName": "SP.Data.MyLibraryItem", "MajorVersionLimit": 500, "MajorWithMinorVersionsLimit": 0, "MultipleDataList": false, "NoCrawl": false, "ParentWebPath": { "DecodedUrl": "/sites/team1" }, "ParentWebUrl": "/sites/team1", "ParserDisabled": false, "ServerTemplateCanCreateFolders": true, "TemplateFeatureId": "00bfea71-e717-4e80-aa17-d0c71b360101", "Title": "MyLibrary" }; } diff --git a/src/m365/spo/commands/listitem/listitem-add.spec.ts b/src/m365/spo/commands/listitem/listitem-add.spec.ts index f4891a328d7..cec39db110d 100644 --- a/src/m365/spo/commands/listitem/listitem-add.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-add.spec.ts @@ -34,11 +34,11 @@ describe(commands.LISTITEM_ADD, () => { const expectedContentType = 'Item'; let actualContentType = ''; - const postFakes = async (opts: any) => { + const postFakes = async (opts: any): Promise => { if (opts.url.indexOf('/_api/web/lists') > -1) { if ((opts.url as string).indexOf('AddValidateUpdateItemUsingPath') > -1) { const bodyString = JSON.stringify(opts.data); - const ctMatch = bodyString.match(/\"?FieldName\"?:\s*\"?ContentType\"?,\s*\"?FieldValue\"?:\s*\"?(\w*)\"?/i); + const ctMatch = bodyString.match(/"?FieldName"?:\s*"?ContentType"?,\s*"?FieldValue"?:\s*"?(\w*)"?/i); actualContentType = ctMatch ? ctMatch[1] : ""; if (bodyString.indexOf("fail adding me") > -1) { return Promise.resolve({ value: [{ ErrorMessage: 'failed updating', 'FieldName': 'Title', 'HasException': true }] }); } return { value: [{ FieldName: "Id", FieldValue: expectedId, HasException: false }] }; @@ -46,7 +46,7 @@ describe(commands.LISTITEM_ADD, () => { } if (opts.url === `https://contoso.sharepoint.com/sites/project-x/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/AddValidateUpdateItemUsingPath()`) { const bodyString = JSON.stringify(opts.data); - const ctMatch = bodyString.match(/\"?FieldName\"?:\s*\"?ContentType\"?,\s*\"?FieldValue\"?:\s*\"?(\w*)\"?/i); + const ctMatch = bodyString.match(/"?FieldName"?:\s*"?ContentType"?,\s*"?FieldValue"?:\s*"?(\w*)"?/i); actualContentType = ctMatch ? ctMatch[1] : ""; if (bodyString.indexOf("fail adding me") > -1) { return Promise.resolve({ value: [] }); } return { value: [{ FieldName: "Id", FieldValue: expectedId }] }; @@ -54,7 +54,7 @@ describe(commands.LISTITEM_ADD, () => { throw 'Invalid request'; }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if (opts.url.indexOf('/_api/web/lists') > -1) { if ((opts.url as string).indexOf('contenttypes') > -1) { return { value: [{ Id: { StringValue: expectedContentType }, Name: "Item" }] }; diff --git a/src/m365/spo/commands/listitem/listitem-attachment-add.spec.ts b/src/m365/spo/commands/listitem/listitem-attachment-add.spec.ts index eb91453d3cd..c4febecdec9 100644 --- a/src/m365/spo/commands/listitem/listitem-attachment-add.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-attachment-add.spec.ts @@ -60,7 +60,7 @@ describe(commands.LISTITEM_ATTACHMENT_ADD, () => { }); afterEach(() => { - sinonUtil.restore([, + sinonUtil.restore([ fs.existsSync, fs.readFileSync, request.post, @@ -136,7 +136,7 @@ describe(commands.LISTITEM_ATTACHMENT_ADD, () => { sinon.stub(fs, 'existsSync').returns(true); sinon.stub(fs, 'readFileSync').returns('content read'); sinon.stub(request, 'post').callsFake(async (args) => { - if (args.url === `${webUrl}/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/items(${listItemId})/AttachmentFiles/add(FileName='${filePath.replace(/^.*[\\\/]/, '')}')`) { + if (args.url === `${webUrl}/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/items(${listItemId})/AttachmentFiles/add(FileName='${filePath.replace(/^.*[\\/]/, '')}')`) { return response; } diff --git a/src/m365/spo/commands/listitem/listitem-attachment-add.ts b/src/m365/spo/commands/listitem/listitem-attachment-add.ts index d1f340374a5..d79a168e78c 100644 --- a/src/m365/spo/commands/listitem/listitem-attachment-add.ts +++ b/src/m365/spo/commands/listitem/listitem-attachment-add.ts @@ -140,7 +140,7 @@ class SpoListItemAttachmentAddCommand extends SpoCommand { private getFileName(filePath: string, fileName?: string): string { if (!fileName) { - return filePath.replace(/^.*[\\\/]/, ''); + return filePath.replace(/^.*[\\/]/, ''); } const extension = filePath.split('.').pop(); diff --git a/src/m365/spo/commands/listitem/listitem-attachment-get.spec.ts b/src/m365/spo/commands/listitem/listitem-attachment-get.spec.ts index ecbaa1b52e4..e88874d9fda 100644 --- a/src/m365/spo/commands/listitem/listitem-attachment-get.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-attachment-get.spec.ts @@ -40,7 +40,7 @@ describe(commands.LISTITEM_ATTACHMENT_GET, () => { "ServerRelativeUrl": "/sites/project-x/Lists/DemoListAttachments/147/File1.jpg" }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if ((opts.url as string).indexOf('/_api/web/lists') > -1) { return attachmentResponse; } diff --git a/src/m365/spo/commands/listitem/listitem-attachment-list.spec.ts b/src/m365/spo/commands/listitem/listitem-attachment-list.spec.ts index 4052e80f251..4bfba4ae0fa 100644 --- a/src/m365/spo/commands/listitem/listitem-attachment-list.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-attachment-list.spec.ts @@ -41,7 +41,7 @@ describe(commands.LISTITEM_ATTACHMENT_LIST, () => { const listItemId = 147; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if ((opts.url as string).indexOf('/_api/web/lists') > -1) { return attachmentsResponse; } diff --git a/src/m365/spo/commands/listitem/listitem-attachment-set.spec.ts b/src/m365/spo/commands/listitem/listitem-attachment-set.spec.ts index d26048a93dc..758f4d88dda 100644 --- a/src/m365/spo/commands/listitem/listitem-attachment-set.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-attachment-set.spec.ts @@ -56,7 +56,7 @@ describe(commands.LISTITEM_ATTACHMENT_SET, () => { }); afterEach(() => { - sinonUtil.restore([, + sinonUtil.restore([ fs.existsSync, fs.readFileSync, request.put, diff --git a/src/m365/spo/commands/listitem/listitem-batch-set.ts b/src/m365/spo/commands/listitem/listitem-batch-set.ts index abd42584c18..6b21014d48c 100644 --- a/src/m365/spo/commands/listitem/listitem-batch-set.ts +++ b/src/m365/spo/commands/listitem/listitem-batch-set.ts @@ -127,7 +127,7 @@ class SpoListItemBatchSetCommand extends SpoCommand { const amountOfRows = jsonContent.length; const idColumn = args.options.idColumn || 'ID'; - if (!jsonContent[0].hasOwnProperty(idColumn)) { + if (!Object.prototype.hasOwnProperty.call(jsonContent[0], idColumn)) { throw `The specified value for idColumn does not exist in the array. Specified idColumn is '${args.options.idColumn || 'ID'}'. Please specify the correct value.`; } @@ -199,26 +199,30 @@ class SpoListItemBatchSetCommand extends SpoCommand { } else { switch (field.TypeAsString) { - case 'User': + case 'User': { const userDetail = users.find(us => us.email === row[field.InternalName])!; actionString += `${field.InternalName}${userDetail.id}`; break; - case 'UserMulti': + } + case 'UserMulti': { const userMultiString: string[] = row[field.InternalName].toString().split(';').map((element: string) => { const userDetail = users.find(us => us.email === element)!; return `${userDetail.id}`; }); actionString += `${field.InternalName}${userMultiString.join('')}`; break; - case 'Lookup': + } + case 'Lookup': { actionString += `${field.InternalName}${row[field.InternalName]}`; break; - case 'LookupMulti': + } + case 'LookupMulti': { const lookupMultiString: string[] = row[field.InternalName].toString().split(';').map((element: string) => { return `${element}`; }); actionString += `${field.InternalName}${lookupMultiString.join('')}`; break; + } default: actionString += `${field.InternalName}${formatting.escapeXml((row)[field.InternalName].toString())}`; break; diff --git a/src/m365/spo/commands/listitem/listitem-get.spec.ts b/src/m365/spo/commands/listitem/listitem-get.spec.ts index 8adccfb4307..277a9fffa8c 100644 --- a/src/m365/spo/commands/listitem/listitem-get.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-get.spec.ts @@ -33,7 +33,7 @@ describe(commands.LISTITEM_GET, () => { let actualId = 0; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if (opts.url === `https://contoso.sharepoint.com/sites/project-x/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/items(147)/RoleAssignments?$expand=Member,RoleDefinitionBindings` || opts.url === `https://contoso.sharepoint.com/sites/project-x/_api/web/lists/getByTitle('${formatting.encodeQueryParameter(listTitle)}')/items(147)/RoleAssignments?$expand=Member,RoleDefinitionBindings` ) { diff --git a/src/m365/spo/commands/listitem/listitem-isrecord.spec.ts b/src/m365/spo/commands/listitem/listitem-isrecord.spec.ts index 47be430e9bd..e3068bef4fc 100644 --- a/src/m365/spo/commands/listitem/listitem-isrecord.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-isrecord.spec.ts @@ -29,7 +29,7 @@ describe(commands.LISTITEM_ISRECORD, () => { let commandInfo: CommandInfo; let loggerLogToStderrSpy: sinon.SinonSpy; - const postFakes = async (opts: any) => { + const postFakes = async (opts: any): Promise => { // requestObjectIdentity mock if (opts.data.indexOf('Name="Current"') > -1) { if ((opts.url as string).indexOf('returnerror.sharepoint.com') > -1) { @@ -80,7 +80,7 @@ describe(commands.LISTITEM_ISRECORD, () => { return Promise.reject('Invalid request'); }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise<{ Id: string }> => { // Get list mock if ((opts.url as string).indexOf('/_api/web/lists') > -1 && (opts.url as string).indexOf('$select=Id') > -1) { diff --git a/src/m365/spo/commands/listitem/listitem-list.spec.ts b/src/m365/spo/commands/listitem/listitem-list.spec.ts index 9497b20b69c..debeea9a540 100644 --- a/src/m365/spo/commands/listitem/listitem-list.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-list.spec.ts @@ -56,7 +56,7 @@ describe(commands.LISTITEM_LIST, () => { const expectedArrayLength = 2; let returnArrayLength = 0; - const postFakes = async (opts: any) => { + const postFakes = async (opts: any): Promise => { if (opts.url.indexOf('/_api/web/lists') > -1) { if ((opts.url as string).indexOf('/GetItems') > -1) { returnArrayLength = 2; @@ -67,7 +67,7 @@ describe(commands.LISTITEM_LIST, () => { throw 'Invalid request'; }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if (opts.url.indexOf('/_api/web/lists') > -1) { if ((opts.url as string).indexOf('/items') > -1 && (opts.url as string).indexOf('$top=6') > -1) { returnArrayLength = 0; diff --git a/src/m365/spo/commands/listitem/listitem-record-declare.spec.ts b/src/m365/spo/commands/listitem/listitem-record-declare.spec.ts index 65cfc5615fd..6d81e21c7ef 100644 --- a/src/m365/spo/commands/listitem/listitem-record-declare.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-record-declare.spec.ts @@ -27,7 +27,7 @@ describe(commands.LISTITEM_RECORD_DECLARE, () => { const listUrl = '/sites/project-x/lists/TestList'; const listServerRelativeUrl: string = urlUtil.getServerRelativePath(webUrl, listUrl); - const postFakes = async (opts: any) => { + const postFakes = async (opts: any): Promise => { if ((opts.url as string).indexOf('_vti_bin/client.svc/ProcessQuery') > -1) { // requestObjectIdentity mock @@ -83,7 +83,7 @@ describe(commands.LISTITEM_RECORD_DECLARE, () => { throw 'Invalid request'; }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise<{ Id: string }> => { if ((opts.url as string).indexOf('/_api/web/lists') > -1 && (opts.url as string).indexOf('$select=Id') > -1) { await logger.log('faked!'); diff --git a/src/m365/spo/commands/listitem/listitem-record-undeclare.spec.ts b/src/m365/spo/commands/listitem/listitem-record-undeclare.spec.ts index 5df26f932f6..698908393e3 100644 --- a/src/m365/spo/commands/listitem/listitem-record-undeclare.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-record-undeclare.spec.ts @@ -25,7 +25,7 @@ describe(commands.LISTITEM_RECORD_UNDECLARE, () => { let log: any[]; let logger: Logger; let commandInfo: CommandInfo; - const postFakes = async (opts: any) => { + const postFakes = async (opts: any): Promise => { if ((opts.url as string).indexOf('_vti_bin/client.svc/ProcessQuery') > -1) { // requestObjectIdentity mock if (opts.data.indexOf('Name="Current"') > -1) { @@ -60,7 +60,7 @@ describe(commands.LISTITEM_RECORD_UNDECLARE, () => { throw 'Invalid request'; }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise<{ Id: string }> => { if (opts.url === `${webUrl}/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')?$select=Id`) { return { Id: '81f0ecee-75a8-46f0-b384-c8f4f9f31d99' }; } diff --git a/src/m365/spo/commands/listitem/listitem-set.spec.ts b/src/m365/spo/commands/listitem/listitem-set.spec.ts index 33f18e4f246..954877cbf0e 100644 --- a/src/m365/spo/commands/listitem/listitem-set.spec.ts +++ b/src/m365/spo/commands/listitem/listitem-set.spec.ts @@ -51,7 +51,7 @@ describe(commands.LISTITEM_SET, () => { const expectedTitle = `List Item 1`; const expectedContentType = 'Item'; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if (opts.url.indexOf('/_api/web/lists') > -1) { if ((opts.url as string).indexOf('contenttypes') > -1) { return { value: [{ Id: { StringValue: expectedContentType }, Name: "Item" }] }; diff --git a/src/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.spec.ts b/src/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.spec.ts index f70fe44b0a5..01a8f451261 100644 --- a/src/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.spec.ts +++ b/src/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.spec.ts @@ -85,21 +85,21 @@ describe(commands.ORGASSETSLIBRARY_LIST, () => { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "sites\u002fsitedesigns\u002fSiteAssets" }, - "ListId": "\/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)\/", + "ListId": "/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)/", "OrgAssetType": 1, "ThumbnailUrl": { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "SiteAssets\u002f__siteIcon__.jpg" }, - "UniqueId": "\/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)\/" + "UniqueId": "/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)/" }] }, - "SiteId": "\/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)\/", + "SiteId": "/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)/", "Url": { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "\u002fsites\u002fsitedesigns" }, - "WebId": "\/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)\/" + "WebId": "/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)/" } ]); } @@ -132,13 +132,13 @@ describe(commands.ORGASSETSLIBRARY_LIST, () => { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "sites\u002fsitedesigns\u002fSiteAssets" }, - "ListId": "\/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)\/", + "ListId": "/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)/", "OrgAssetType": 1, "ThumbnailUrl": { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "SiteAssets\u002f__siteIcon__.jpg" }, - "UniqueId": "\/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)\/" + "UniqueId": "/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)/" }, { "_ObjectType_": "Microsoft.SharePoint.Administration.OrgAssetsLibrary", "DisplayName": "Site Assets 2", @@ -147,18 +147,18 @@ describe(commands.ORGASSETSLIBRARY_LIST, () => { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "sites\u002fsitedesigns\u002fSiteAssets2" }, - "ListId": "\/Guid(86c2e234-c996-4877-b3a6-8aebd8ab45b6)\/", + "ListId": "/Guid(86c2e234-c996-4877-b3a6-8aebd8ab45b6)/", "OrgAssetType": 1, "ThumbnailUrl": null, - "UniqueId": "\/Guid(1d3c9e72-60f5-40f8-9e29-b91036f5630e)\/" + "UniqueId": "/Guid(1d3c9e72-60f5-40f8-9e29-b91036f5630e)/" }] }, - "SiteId": "\/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)\/", + "SiteId": "/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)/", "Url": { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "\u002fsites\u002fsitedesigns" }, - "WebId": "\/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)\/" + "WebId": "/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)/" } ]); } @@ -190,18 +190,18 @@ describe(commands.ORGASSETSLIBRARY_LIST, () => { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "sites\u002fsitedesigns\u002fSiteAssets" }, - "ListId": "\/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)\/", + "ListId": "/Guid(96c2e234-c996-4877-b3a6-8aebd8ab45b6)/", "OrgAssetType": 1, "ThumbnailUrl": null, - "UniqueId": "\/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)\/" + "UniqueId": "/Guid(0d3c9e72-60f5-40f8-9e29-b91036f5630e)/" }] }, - "SiteId": "\/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)\/", + "SiteId": "/Guid(9f0e0a96-14ec-4d4f-9b04-a8698367cd36)/", "Url": { "_ObjectType_": "SP.ResourcePath", "DecodedUrl": "\u002fsites\u002fsitedesigns" }, - "WebId": "\/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)\/" + "WebId": "/Guid(030c8d27-1bb4-4042-a252-dce8ac1e9f00)/" } ]); } @@ -391,3 +391,4 @@ describe(commands.ORGASSETSLIBRARY_LIST, () => { new CommandError('An error has occurred')); }); }); + diff --git a/src/m365/spo/commands/page/clientsidepages.ts b/src/m365/spo/commands/page/clientsidepages.ts index 6d8a3708e57..685bd6c2236 100644 --- a/src/m365/spo/commands/page/clientsidepages.ts +++ b/src/m365/spo/commands/page/clientsidepages.ts @@ -82,7 +82,7 @@ function extend(target: any, source: any, noOverwrite = false): any { } // ensure we don't overwrite things we don't want overwritten - const check: (o: any, i: string) => Boolean = noOverwrite ? (o, i) => !(i in o) : () => true; + const check: (o: any, i: string) => boolean = noOverwrite ? (o, i) => !(i in o) : () => true; return Object.getOwnPropertyNames(source) .filter((v: string) => check(target, v)) @@ -151,7 +151,7 @@ function getNextOrder(collection: { order: number }[]): number { * @param regex A regex or string to match * @param startpos A starting position from which the search will begin */ -function regexIndexOf(this: string, regex: RegExp | string, startpos = 0) { +function regexIndexOf(this: string, regex: RegExp | string, startpos = 0): number { const indexOf = this.substring(startpos).search(regex); return (indexOf >= 0) ? (indexOf + (startpos)) : indexOf; } @@ -220,7 +220,8 @@ function getBoundedDivMarkup(html: string, boundaryStartPattern: RegExp | str if (nextDivOpen < nextCloseDiv) { openCounter++; searchIndex = nextDivOpen + 1; - } else if (nextCloseDiv < nextDivOpen) { + } + else if (nextCloseDiv < nextDivOpen) { openCounter--; searchIndex = nextCloseDiv + 1; } @@ -268,7 +269,8 @@ function reindex(collection?: { order: number, columns?: { order: number }[], co collection[i].order = i + 1; if (hOP(collection[i], "columns")) { reindex(collection[i].columns); - } else if (hOP(collection[i], "controls")) { + } + else if (hOP(collection[i], "controls")) { reindex(collection[i].controls); } } @@ -293,11 +295,11 @@ export class ClientSidePage { .replace(/:/g, ":") .replace(/{/g, "{") .replace(/}/g, "}") - .replace(/\[/g, "\[") - .replace(/\]/g, "\]") - .replace(/\*/g, "\*") - .replace(/\$/g, "\$") - .replace(/\./g, "\."); + .replace(/\[/g, "[") + .replace(/\]/g, "]") + .replace(/\*/g, "*") + .replace(/\$/g, "$") + .replace(/\./g, "."); } /** @@ -315,7 +317,7 @@ export class ClientSidePage { [/\\/g, "\\\\"], [/"/g, "\""], [/:/g, ":"], [/{/g, "{"], [/}/g, "}"], [/\\\\/g, "\\"], [/\\\?/g, "?"], [/\\\./g, "."], [/\\\[/g, "["], [/\\\]/g, "]"], [/\\\(/g, "("], [/\\\)/g, ")"], [/\\\|/g, "|"], [/\\\+/g, "+"], [/\\\*/g, "*"], - [/\\\$/g, "$"], + [/\\\$/g, "$"] ]; return mapDict.reduce((r, m) => r.replace(m[0], m[1] as string), escaped); }; @@ -369,7 +371,7 @@ export class ClientSidePage { const ct = /controlType":(\d*?)(,|&)/i.exec(markup); // if no control type is present this is a column which we give type 0 to let us process it - const controlType = ct == null || ct.length < 0 ? -1 : parseInt(ct[1], 10); + const controlType = ct === null || ct.length < 0 ? -1 : parseInt(ct[1], 10); let control: CanvasControl | null = null; @@ -475,7 +477,8 @@ export class ClientSidePage { if (sections.length < 1) { section = new CanvasSection(this, zoneIndex, [], control?.controlData); this.sections.push(section); - } else { + } + else { section = sections[0]; } @@ -483,7 +486,8 @@ export class ClientSidePage { if (columns.length < 1) { column = new CanvasColumn(section, sectionIndex, sectionFactor); section.columns.push(column); - } else { + } + else { column = columns[0]; } @@ -506,7 +510,8 @@ export class ClientSidePage { if (sections.length < 1) { section = new CanvasSection(this, order, [], column.controlData); this.sections.push(section); - } else { + } + else { section = sections[0]; } @@ -537,7 +542,6 @@ export class CanvasSection { * Default column (this.columns[0]) for this section */ public get defaultColumn(): CanvasColumn { - if (this.columns.length < 1) { this.addColumn(12); } @@ -549,14 +553,12 @@ export class CanvasSection { * Adds a new column to this section */ public addColumn(factor: CanvasColumnFactorType): CanvasColumn { - const column = new CanvasColumn(this, getNextOrder(this.columns), factor); this.columns.push(column); return column; } public toHtml(): string { - const html = []; for (let i = 0; i < this.columns.length; i++) { @@ -654,9 +656,8 @@ export class CanvasColumn extends CanvasControl { if (this.controls.length < 1) { html.push(`
`); - - } else { - + } + else { for (let i = 0; i < this.controls.length; i++) { html.push(this.controls[i].toHtml(i + 1)); } @@ -686,7 +687,7 @@ export class CanvasColumn extends CanvasControl { sectionIndex: this.order, zoneIndex: this.section?.order || 0, zoneId: this.section?.zoneId, - layoutIndex: this.section?.layoutIndex, + layoutIndex: this.section?.layoutIndex }, zoneGroupMetadata: this.section?.zoneGroupMetadata, emphasis: this.section?.emphasis @@ -754,7 +755,7 @@ export class BackgroundSettings extends ClientSidePart { dataVersion: this.dataVersion, instanceId: this.id, properties: this.propertieJson, - serverProcessedContent: this.serverProcessedContent, + serverProcessedContent: this.serverProcessedContent }; const html: string[] = []; @@ -846,7 +847,7 @@ export class ClientSideText extends ClientSidePart { layoutIndex: this.column?.section?.layoutIndex }, zoneGroupMetadata: this.column?.section?.zoneGroupMetadata, - emphasis: this.column?.section?.emphasis, + emphasis: this.column?.section?.emphasis }; if (this.column?.section?.isLayoutReflowOnTop !== undefined) { @@ -1004,11 +1005,11 @@ export class ClientSideWebpart extends ClientSidePart { sectionIndex: this.column ? this.column.order : 0, zoneIndex: this.column && this.column.section ? this.column.section.order : 0, zoneId: this.column?.section?.zoneId, - layoutIndex: this.column?.section?.layoutIndex, + layoutIndex: this.column?.section?.layoutIndex }, webPartId: this.webPartId, zoneGroupMetadata: this.column?.section?.zoneGroupMetadata, - emphasis: this.column?.section?.emphasis, + emphasis: this.column?.section?.emphasis }; if (this.column?.section?.isLayoutReflowOnTop !== undefined) { @@ -1016,7 +1017,6 @@ export class ClientSideWebpart extends ClientSidePart { } return controlData; - } protected renderHtmlProperties(): string { @@ -1027,8 +1027,8 @@ export class ClientSideWebpart extends ClientSidePart { html.push(this.htmlProperties); - } else if (typeof this.serverProcessedContent !== "undefined") { - + } + else if (typeof this.serverProcessedContent !== "undefined") { if (typeof this.serverProcessedContent.searchablePlainTexts !== "undefined") { const keys = Object.keys(this.serverProcessedContent.searchablePlainTexts); @@ -1048,7 +1048,6 @@ export class ClientSideWebpart extends ClientSidePart { } if (typeof this.serverProcessedContent.links !== "undefined") { - const keys = Object.keys(this.serverProcessedContent.links); for (let i = 0; i < keys.length; i++) { html.push(``); @@ -1064,36 +1063,43 @@ export class ClientSideWebpart extends ClientSidePart { // If the web part has the serverProcessedContent property then keep this one as it might be needed as input to render the web part HTML later on if (typeof props.webPartData !== "undefined" && typeof props.webPartData.serverProcessedContent !== "undefined") { this.serverProcessedContent = props.webPartData.serverProcessedContent; - } else if (typeof props.serverProcessedContent !== "undefined") { + } + else if (typeof props.serverProcessedContent !== "undefined") { this.serverProcessedContent = props.serverProcessedContent; - } else { + } + else { this.serverProcessedContent = null; } if (typeof props.webPartData !== "undefined" && typeof props.webPartData.dynamicDataPaths !== "undefined") { this.dynamicDataPaths = props.webPartData.dynamicDataPaths; - } else if (typeof props.dynamicDataPaths !== "undefined") { + } + else if (typeof props.dynamicDataPaths !== "undefined") { this.dynamicDataPaths = props.dynamicDataPaths; - } else { + } + else { this.dynamicDataPaths = null; } if (typeof props.webPartData !== "undefined" && typeof props.webPartData.dynamicDataValues !== "undefined") { this.dynamicDataValues = props.webPartData.dynamicDataValues; - } else if (typeof props.dynamicDataValues !== "undefined") { + } + else if (typeof props.dynamicDataValues !== "undefined") { this.dynamicDataValues = props.dynamicDataValues; - } else { + } + else { this.dynamicDataValues = null; } if (typeof props.webPartData !== "undefined" && typeof props.webPartData.properties !== "undefined") { return props.webPartData.properties; - } else if (typeof props.properties !== "undefined") { + } + else if (typeof props.properties !== "undefined") { return props.properties; - } else { + } + else { return props; } - } } @@ -1211,7 +1217,4 @@ interface ClientSideWebpartData { serverProcessedContent?: ServerProcessedContent; dynamicDataPaths?: any; dynamicDataValues?: any; -} - -export module ClientSideWebpartPropertyTypes { } \ No newline at end of file diff --git a/src/m365/spo/commands/page/page-add.spec.ts b/src/m365/spo/commands/page/page-add.spec.ts index df9dce514e9..397a800723f 100644 --- a/src/m365/spo/commands/page/page-add.spec.ts +++ b/src/m365/spo/commands/page/page-add.spec.ts @@ -19,8 +19,7 @@ describe(commands.PAGE_ADD, () => { let logger: Logger; let loggerLogSpy: sinon.SinonSpy; let commandInfo: CommandInfo; - const fileResponse = - { + const fileResponse = { Attachments: false, AuthorId: 3, ContentTypeId: '0x0100B21BD271A810EE488B570BE49963EA34', diff --git a/src/m365/spo/commands/page/page-add.ts b/src/m365/spo/commands/page/page-add.ts index cee8c35f7df..94f2f72d2ab 100644 --- a/src/m365/spo/commands/page/page-add.ts +++ b/src/m365/spo/commands/page/page-add.ts @@ -191,7 +191,7 @@ class SpoPageAddCommand extends SpoCommand { }; await request.post(requestOptions); break; - case 'NewsPage': + case 'NewsPage': { const listItemSetOptions: any = { FirstPublishedDate: new Date().toISOString() }; @@ -200,7 +200,8 @@ class SpoPageAddCommand extends SpoCommand { await spo.systemUpdateListItem(requestUrl, listItemId, logger, this.verbose, listItemSetOptions); break; - case 'Template': + } + case 'Template': { requestOptions.url = `${args.options.webUrl}/_api/SitePages/Pages(${listItemId})/SavePageAsTemplate`; requestOptions.headers = { 'X-RequestDigest': requestDigest, @@ -226,6 +227,7 @@ class SpoPageAddCommand extends SpoCommand { await request.post(requestOptions); break; + } } } diff --git a/src/m365/spo/commands/page/page-clientsidewebpart-add.spec.ts b/src/m365/spo/commands/page/page-clientsidewebpart-add.spec.ts index a1d053c2f40..b2732181833 100644 --- a/src/m365/spo/commands/page/page-clientsidewebpart-add.spec.ts +++ b/src/m365/spo/commands/page/page-clientsidewebpart-add.spec.ts @@ -34,7 +34,7 @@ describe(commands.PAGE_CLIENTSIDEWEBPART_ADD, () => { // with a static GUID const replaceId = (str: string): string => { const id: string[] = []; - let s = str.replace(/(\"instanceId\\\"\:\\\")([^\\]+)(\\\")/g, (match: string, p1: string, p2: string, p3: string): string => { + let s = str.replace(/("instanceId\\":\\")([^\\]+)(\\")/g, (match: string, p1: string, p2: string, p3: string): string => { id.push(p2); return `${p1}89c644b3-f69c-4e84-85d7-dfa04c6163b5${p3}`; }); diff --git a/src/m365/spo/commands/page/page-clientsidewebpart-add.ts b/src/m365/spo/commands/page/page-clientsidewebpart-add.ts index 3601fca43ec..1d51e02f9f0 100644 --- a/src/m365/spo/commands/page/page-clientsidewebpart-add.ts +++ b/src/m365/spo/commands/page/page-clientsidewebpart-add.ts @@ -397,6 +397,7 @@ class SpoPageClientSideWebPartAddCommand extends SpoCommand { (webPart as any).webPartData.properties = this.extend((webPart as any).webPartData.properties, properties); } catch { + // Do nothing } } diff --git a/src/m365/spo/commands/page/page-section-add.spec.ts b/src/m365/spo/commands/page/page-section-add.spec.ts index 8a26a50548f..f510afde96a 100644 --- a/src/m365/spo/commands/page/page-section-add.spec.ts +++ b/src/m365/spo/commands/page/page-section-add.spec.ts @@ -620,7 +620,7 @@ describe(commands.PAGE_SECTION_ADD, () => { imageUrl: 'https://contoso.com/image.jpg' } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true}},{\"displayMode\":2,\"position\":{\"zoneIndex\":1,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"${newZoneId}\":{\"type\":\"image\",\"imageData\":{\"source\":2,\"fileName\":\"sectionbackground.jpg\",\"height\":955,\"width\":555},\"fillMode\":0,\"useLightText\":false,\"overlay\":{\"color\":\"#FFFFFF\",\"opacity\":60}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"zoneBackground.${newZoneId}.imageData.url\":\"https://contoso.com/image.jpg\"},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true}},{"displayMode":2,"position":{"zoneIndex":1,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"${newZoneId}":{"type":"image","imageData":{"source":2,"fileName":"sectionbackground.jpg","height":955,"width":555},"fillMode":0,"useLightText":false,"overlay":{"color":"#FFFFFF","opacity":60}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{"zoneBackground.${newZoneId}.imageData.url":"https://contoso.com/image.jpg"},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to an uncustomized page with Gradient zoneEmphasis', async () => { @@ -655,7 +655,7 @@ describe(commands.PAGE_SECTION_ADD, () => { gradientText: 'test gradient' } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true}},{\"displayMode\":2,\"position\":{\"zoneIndex\":1,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"${newZoneId}\":{\"type\":\"gradient\",\"gradient\":\"test gradient\",\"useLightText\":false,\"overlay\":{\"color\":\"#FFFFFF\",\"opacity\":60}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true}},{"displayMode":2,"position":{"zoneIndex":1,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"${newZoneId}":{"type":"gradient","gradient":"test gradient","useLightText":false,"overlay":{"color":"#FFFFFF","opacity":60}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to an uncustomized page with Image zoneEmphasis and all options available', async () => { @@ -696,7 +696,7 @@ describe(commands.PAGE_SECTION_ADD, () => { overlayOpacity: 50 } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true}},{\"displayMode\":2,\"position\":{\"zoneIndex\":1,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"${newZoneId}\":{\"type\":\"image\",\"imageData\":{\"source\":2,\"fileName\":\"sectionbackground.jpg\",\"height\":100,\"width\":200},\"fillMode\":0,\"useLightText\":true,\"overlay\":{\"color\":\"#FF00FF\",\"opacity\":50}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"zoneBackground.${newZoneId}.imageData.url\":\"https://contoso.com/image.jpg\"},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true}},{"displayMode":2,"position":{"zoneIndex":1,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"${newZoneId}":{"type":"image","imageData":{"source":2,"fileName":"sectionbackground.jpg","height":100,"width":200},"fillMode":0,"useLightText":true,"overlay":{"color":"#FF00FF","opacity":50}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{"zoneBackground.${newZoneId}.imageData.url":"https://contoso.com/image.jpg"},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to an uncustomized page with Gradient zoneEmphasis and all options available', async () => { @@ -733,7 +733,7 @@ describe(commands.PAGE_SECTION_ADD, () => { overlayOpacity: 50 } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true}},{\"displayMode\":2,\"position\":{\"zoneIndex\":1,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"${newZoneId}\":{\"type\":\"gradient\",\"gradient\":\"test gradient\",\"useLightText\":false,\"overlay\":{\"color\":\"#FF00FF\",\"opacity\":50}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true}},{"displayMode":2,"position":{"zoneIndex":1,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"${newZoneId}":{"type":"gradient","gradient":"test gradient","useLightText":false,"overlay":{"color":"#FF00FF","opacity":50}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to a page with background section added with Image zoneEmphasis', async () => { @@ -768,7 +768,7 @@ describe(commands.PAGE_SECTION_ADD, () => { imageUrl: 'https://contoso.com/image.jpg' } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"position\":{\"layoutIndex\":1,\"zoneIndex\":2,\"sectionIndex\":1,\"controlIndex\":1,\"sectionFactor\":6,\"zoneId\":\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"position\":{\"layoutIndex\":1,\"zoneIndex\":2,\"sectionIndex\":2,\"controlIndex\":1,\"sectionFactor\":6,\"zoneId\":\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"position\":{\"layoutIndex\":1,\"zoneIndex\":3,\"sectionIndex\":1,\"controlIndex\":1,\"sectionFactor\":12,\"zoneId\":\"931e6d64-c667-4e2e-b678-eab508d511c8\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true,\"globalRichTextStylingVersion\":0,\"rtePageSettings\":{\"contentVersion\":4},\"isEmailReady\":false}},{\"displayMode\":2,\"position\":{\"zoneIndex\":4,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\":{\"type\":\"gradient\",\"gradient\":\"radial-gradient(53.89% 99.37% at 39.45% -6.02%, rgba(4, 110, 212, 0.8) 0%, rgba(4, 110, 212, 0) 100%),\\n radial-gradient(47.01% 82.21% at 104.3% 15.51%, rgba(118, 5, 180, 0.5) 0%, rgba(118, 5, 180, 0) 100%),\\n radial-gradient(56.12% 58.33% at 50% 131.71%, #7605B4 34.7%, rgba(118, 5, 180, 0) 100%),\\n linear-gradient(0deg, #110739, #110739)\",\"useLightText\":true,\"overlay\":{\"color\":\"#000000\",\"opacity\":35}},\"931e6d64-c667-4e2e-b678-eab508d511c8\":{\"type\":\"image\",\"imageData\":{\"source\":1,\"fileName\":\"sectionbackgroundimagedark3.jpg\",\"height\":955,\"width\":555},\"overlay\":{\"color\":\"#000000\",\"opacity\":60},\"useLightText\":true},\"${newZoneId}\":{\"type\":\"image\",\"imageData\":{\"source\":2,\"fileName\":\"sectionbackground.jpg\",\"height\":955,\"width\":555},\"fillMode\":0,\"useLightText\":false,\"overlay\":{\"color\":\"#FFFFFF\",\"opacity\":60}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"zoneBackground.931e6d64-c667-4e2e-b678-eab508d511c8.imageData.url\":\"/_layouts/15/images/sectionbackgroundimagedark3.jpg\",\"zoneBackground.${newZoneId}.imageData.url\":\"https://contoso.com/image.jpg\"},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"position":{"layoutIndex":1,"zoneIndex":2,"sectionIndex":1,"controlIndex":1,"sectionFactor":6,"zoneId":"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35"},"id":"emptySection","addedFromPersistedData":true},{"position":{"layoutIndex":1,"zoneIndex":2,"sectionIndex":2,"controlIndex":1,"sectionFactor":6,"zoneId":"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35"},"id":"emptySection","addedFromPersistedData":true},{"position":{"layoutIndex":1,"zoneIndex":3,"sectionIndex":1,"controlIndex":1,"sectionFactor":12,"zoneId":"931e6d64-c667-4e2e-b678-eab508d511c8"},"id":"emptySection","addedFromPersistedData":true},{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true,"globalRichTextStylingVersion":0,"rtePageSettings":{"contentVersion":4},"isEmailReady":false}},{"displayMode":2,"position":{"zoneIndex":4,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35":{"type":"gradient","gradient":"radial-gradient(53.89% 99.37% at 39.45% -6.02%, rgba(4, 110, 212, 0.8) 0%, rgba(4, 110, 212, 0) 100%),\\n radial-gradient(47.01% 82.21% at 104.3% 15.51%, rgba(118, 5, 180, 0.5) 0%, rgba(118, 5, 180, 0) 100%),\\n radial-gradient(56.12% 58.33% at 50% 131.71%, #7605B4 34.7%, rgba(118, 5, 180, 0) 100%),\\n linear-gradient(0deg, #110739, #110739)","useLightText":true,"overlay":{"color":"#000000","opacity":35}},"931e6d64-c667-4e2e-b678-eab508d511c8":{"type":"image","imageData":{"source":1,"fileName":"sectionbackgroundimagedark3.jpg","height":955,"width":555},"overlay":{"color":"#000000","opacity":60},"useLightText":true},"${newZoneId}":{"type":"image","imageData":{"source":2,"fileName":"sectionbackground.jpg","height":955,"width":555},"fillMode":0,"useLightText":false,"overlay":{"color":"#FFFFFF","opacity":60}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{"zoneBackground.931e6d64-c667-4e2e-b678-eab508d511c8.imageData.url":"/_layouts/15/images/sectionbackgroundimagedark3.jpg","zoneBackground.${newZoneId}.imageData.url":"https://contoso.com/image.jpg"},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to a page with background section added with Gradient zoneEmphasis', async () => { @@ -803,7 +803,7 @@ describe(commands.PAGE_SECTION_ADD, () => { gradientText: 'test gradient' } }); - assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{\"position\":{\"layoutIndex\":1,\"zoneIndex\":2,\"sectionIndex\":1,\"controlIndex\":1,\"sectionFactor\":6,\"zoneId\":\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"position\":{\"layoutIndex\":1,\"zoneIndex\":2,\"sectionIndex\":2,\"controlIndex\":1,\"sectionFactor\":6,\"zoneId\":\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"position\":{\"layoutIndex\":1,\"zoneIndex\":3,\"sectionIndex\":1,\"controlIndex\":1,\"sectionFactor\":12,\"zoneId\":\"931e6d64-c667-4e2e-b678-eab508d511c8\"},\"id\":\"emptySection\",\"addedFromPersistedData\":true},{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true,\"globalRichTextStylingVersion\":0,\"rtePageSettings\":{\"contentVersion\":4},\"isEmailReady\":false}},{\"displayMode\":2,\"position\":{\"zoneIndex\":4,\"sectionIndex\":1,\"sectionFactor\":12,\"layoutIndex\":1,\"zoneId\":\"${newZoneId}\"},\"emphasis\":{}},{\"controlType\":14,\"webPartData\":{\"properties\":{\"zoneBackground\":{\"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35\":{\"type\":\"gradient\",\"gradient\":\"radial-gradient(53.89% 99.37% at 39.45% -6.02%, rgba(4, 110, 212, 0.8) 0%, rgba(4, 110, 212, 0) 100%),\\n radial-gradient(47.01% 82.21% at 104.3% 15.51%, rgba(118, 5, 180, 0.5) 0%, rgba(118, 5, 180, 0) 100%),\\n radial-gradient(56.12% 58.33% at 50% 131.71%, #7605B4 34.7%, rgba(118, 5, 180, 0) 100%),\\n linear-gradient(0deg, #110739, #110739)\",\"useLightText\":true,\"overlay\":{\"color\":\"#000000\",\"opacity\":35}},\"931e6d64-c667-4e2e-b678-eab508d511c8\":{\"type\":\"image\",\"imageData\":{\"source\":1,\"fileName\":\"sectionbackgroundimagedark3.jpg\",\"height\":955,\"width\":555},\"overlay\":{\"color\":\"#000000\",\"opacity\":60},\"useLightText\":true},\"${newZoneId}\":{\"type\":\"gradient\",\"gradient\":\"test gradient\",\"useLightText\":false,\"overlay\":{\"color\":\"#FFFFFF\",\"opacity\":60}}}},\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"zoneBackground.931e6d64-c667-4e2e-b678-eab508d511c8.imageData.url\":\"/_layouts/15/images/sectionbackgroundimagedark3.jpg\"},\"links\":{}},\"dataVersion\":\"1.0\"}}]` }); + assert.deepStrictEqual(postStub.lastCall.args[0].data, { "CanvasContent1": `[{"position":{"layoutIndex":1,"zoneIndex":2,"sectionIndex":1,"controlIndex":1,"sectionFactor":6,"zoneId":"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35"},"id":"emptySection","addedFromPersistedData":true},{"position":{"layoutIndex":1,"zoneIndex":2,"sectionIndex":2,"controlIndex":1,"sectionFactor":6,"zoneId":"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35"},"id":"emptySection","addedFromPersistedData":true},{"position":{"layoutIndex":1,"zoneIndex":3,"sectionIndex":1,"controlIndex":1,"sectionFactor":12,"zoneId":"931e6d64-c667-4e2e-b678-eab508d511c8"},"id":"emptySection","addedFromPersistedData":true},{"controlType":0,"pageSettingsSlice":{"isDefaultDescription":true,"isDefaultThumbnail":true,"globalRichTextStylingVersion":0,"rtePageSettings":{"contentVersion":4},"isEmailReady":false}},{"displayMode":2,"position":{"zoneIndex":4,"sectionIndex":1,"sectionFactor":12,"layoutIndex":1,"zoneId":"${newZoneId}"},"emphasis":{}},{"controlType":14,"webPartData":{"properties":{"zoneBackground":{"0158a0e8-20ad-4d8d-9cdc-6e1fde815a35":{"type":"gradient","gradient":"radial-gradient(53.89% 99.37% at 39.45% -6.02%, rgba(4, 110, 212, 0.8) 0%, rgba(4, 110, 212, 0) 100%),\\n radial-gradient(47.01% 82.21% at 104.3% 15.51%, rgba(118, 5, 180, 0.5) 0%, rgba(118, 5, 180, 0) 100%),\\n radial-gradient(56.12% 58.33% at 50% 131.71%, #7605B4 34.7%, rgba(118, 5, 180, 0) 100%),\\n linear-gradient(0deg, #110739, #110739)","useLightText":true,"overlay":{"color":"#000000","opacity":35}},"931e6d64-c667-4e2e-b678-eab508d511c8":{"type":"image","imageData":{"source":1,"fileName":"sectionbackgroundimagedark3.jpg","height":955,"width":555},"overlay":{"color":"#000000","opacity":60},"useLightText":true},"${newZoneId}":{"type":"gradient","gradient":"test gradient","useLightText":false,"overlay":{"color":"#FFFFFF","opacity":60}}}},"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{"zoneBackground.931e6d64-c667-4e2e-b678-eab508d511c8.imageData.url":"/_layouts/15/images/sectionbackgroundimagedark3.jpg"},"links":{}},"dataVersion":"1.0"}}]` }); }); it('adds a OneColumn section at the end to an uncustomized page with collapsible setting', async () => { diff --git a/src/m365/spo/commands/page/page-section-add.ts b/src/m365/spo/commands/page/page-section-add.ts index 1502942dbf6..1323759774c 100644 --- a/src/m365/spo/commands/page/page-section-add.ts +++ b/src/m365/spo/commands/page/page-section-add.ts @@ -1,7 +1,7 @@ import { v4 } from 'uuid'; import { Logger } from '../../../../cli/Logger.js'; import GlobalOptions from '../../../../GlobalOptions.js'; -import request from '../../../../request.js'; +import request, { CliRequestOptions } from '../../../../request.js'; import { formatting } from '../../../../utils/formatting.js'; import { validation } from '../../../../utils/validation.js'; import SpoCommand from '../../../base/SpoCommand.js'; @@ -277,7 +277,7 @@ class SpoPageSectionAddCommand extends SpoCommand { } try { - let requestOptions: any = { + let requestOptions: CliRequestOptions = { url: `${args.options.webUrl}/_api/sitepages/pages/GetByUrl('sitepages/${formatting.encodeQueryParameter(pageFullName)}')?$select=CanvasContent1,IsPageCheckedOutToCurrentUser`, headers: { 'accept': 'application/json;odata=nometadata' diff --git a/src/m365/spo/commands/page/page-set.spec.ts b/src/m365/spo/commands/page/page-set.spec.ts index 86d4a326f98..2b409797702 100644 --- a/src/m365/spo/commands/page/page-set.spec.ts +++ b/src/m365/spo/commands/page/page-set.spec.ts @@ -503,7 +503,7 @@ describe(commands.PAGE_SET, () => { return; } - if ((opts.url as string).indexOf(`_api/web/GetFileByServerRelativePath(DecodedUrl='/sites/team-a/sitepages/page.aspx')/CheckIn(comment=@a1,checkintype=@a2)?@a1=\'\'&@a2=1`) > -1) { + if ((opts.url as string).indexOf(`_api/web/GetFileByServerRelativePath(DecodedUrl='/sites/team-a/sitepages/page.aspx')/CheckIn(comment=@a1,checkintype=@a2)?@a1=''&@a2=1`) > -1) { return; } diff --git a/src/m365/spo/commands/page/page-set.ts b/src/m365/spo/commands/page/page-set.ts index 0775b04b597..59b2dec8a88 100644 --- a/src/m365/spo/commands/page/page-set.ts +++ b/src/m365/spo/commands/page/page-set.ts @@ -231,7 +231,7 @@ class SpoPageSetCommand extends SpoCommand { }; await request.post(requestOptions); break; - case 'NewsPage': + case 'NewsPage': { const newsPageItem = await spo.getFileAsListItemByUrl(args.options.webUrl, serverRelativeFileUrl, logger, this.verbose); const newsPageItemId = newsPageItem.Id; const listItemSetOptions: any = { @@ -240,7 +240,8 @@ class SpoPageSetCommand extends SpoCommand { }; await spo.systemUpdateListItem(requestUrl, newsPageItemId, logger, this.verbose, listItemSetOptions); break; - case 'Template': + } + case 'Template': { const templateItem = await spo.getFileAsListItemByUrl(args.options.webUrl, serverRelativeFileUrl, logger, this.verbose); const templateItemId = templateItem.Id; requestOptions.headers = { @@ -269,6 +270,7 @@ class SpoPageSetCommand extends SpoCommand { } pageId = res.Id; break; + } } } diff --git a/src/m365/spo/commands/page/page-text-add.ts b/src/m365/spo/commands/page/page-text-add.ts index a7b04e800c5..b7d8ee0d42c 100644 --- a/src/m365/spo/commands/page/page-text-add.ts +++ b/src/m365/spo/commands/page/page-text-add.ts @@ -122,6 +122,7 @@ class SpoPageTextAddCommand extends SpoCommand { // Add a new section when page does not contain any sections if (page.sections.length < 1) { const newSection = new CanvasSection(page, 1); + // eslint-disable-next-line @typescript-eslint/no-unused-expressions newSection.defaultColumn; page.sections.push(newSection); } diff --git a/src/m365/spo/commands/page/page.mock.ts b/src/m365/spo/commands/page/page.mock.ts index d383a4202f2..cde65d47031 100644 --- a/src/m365/spo/commands/page/page.mock.ts +++ b/src/m365/spo/commands/page/page.mock.ts @@ -1,27 +1,27 @@ -export const mockPageSettingsHTML = `
`; +export const mockPageSettingsHTML = `
`; -export const mockFullWidthSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockFullWidthSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockOneColumnSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockOneColumnSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockTwoColumnsSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockTwoColumnsSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockThreeColumnSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockThreeColumnSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockTwoColumnLeftSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockTwoColumnLeftSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockTwoColumnRightSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockTwoColumnRightSectionHTML = (zoneIndex: number = 1, isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockVerticalSectionHTML = (isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; +export const mockVerticalSectionHTML = (isEmphasis?: boolean, isCollapsible?: boolean, isWithTextWebpart?: boolean, isWithBingWebpart?: boolean): string => `
${isWithTextWebpart ? mockTextWebpartHTMLFragment : ''}${isWithBingWebpart ? mockBingWebpartHTMLFragment : ''}
`; -export const mockBackgroundControlHTML = `
`; +export const mockBackgroundControlHTML = `
`; const mockEmphasisHTMLFragment = ',"emphasis":{"zoneEmphasis":2}'; const mockCollapsibleSectionHTMLFragment = ',"zoneGroupMetadata":{"type":1,"isExpanded":true,"showDividerLine":false,"iconAlignment":"left","headingLevel":2,"displayName":"Test"}'; -const mockTextWebpartHTMLFragment = '

test

'; +const mockTextWebpartHTMLFragment = '

test

'; -const mockBingWebpartHTMLFragment = `
e377ea37-9047-43b9-8cdb-a761be2f8e09
`; +const mockBingWebpartHTMLFragment = `
e377ea37-9047-43b9-8cdb-a761be2f8e09
`; export const mockEmptyPage = `
${mockPageSettingsHTML}
`; \ No newline at end of file diff --git a/src/m365/spo/commands/propertybag/propertybag-base.ts b/src/m365/spo/commands/propertybag/propertybag-base.ts index 52c00d8d33c..ffd8076d209 100644 --- a/src/m365/spo/commands/propertybag/propertybag-base.ts +++ b/src/m365/spo/commands/propertybag/propertybag-base.ts @@ -40,34 +40,29 @@ export abstract class SpoPropertyBagBaseCommand extends SpoCommand { }, data: `${serverRelativeUrl}` }; - try { - const res: string = await request.post(requestOptions); + const res: string = await request.post(requestOptions); - if (this.debug) { - await logger.logToStderr('Attempt to get Properties key values'); - } - - const json: ClientSvcResponse = JSON.parse(res); - - const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); - if (contents && contents.ErrorInfo) { - throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; - } + if (this.verbose) { + await logger.logToStderr('Attempt to get Properties key values'); + } - const propertiesObj = json.find(x => { return x['Properties']; }); - if (propertiesObj) { - return propertiesObj['Properties']; - } + const json: ClientSvcResponse = JSON.parse(res); - throw 'Cannot proceed. Properties not found'; // this is not suppose to happen + const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); + if (contents && contents.ErrorInfo) { + throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; } - catch (err: any) { - throw err; + + const propertiesObj = json.find(x => { return x['Properties']; }); + if (propertiesObj) { + return propertiesObj['Properties']; } + + throw 'Cannot proceed. Properties not found'; // this is not suppose to happen } /** - * Gets property bag for site or sitecollection where return type is "_ObjectType_\":\"SP.Web\". + * Gets property bag for site or site collection where return type is "_ObjectType_\":\"SP.Web\". * This method is executed when no folder specified. PnP PowerShell behaves the same way. */ protected async getWebPropertyBag(identityResp: IdentityResponse, webUrl: string, logger: Logger): Promise { @@ -79,28 +74,23 @@ export abstract class SpoPropertyBagBaseCommand extends SpoCommand { data: `` }; - try { - const res: any = await request.post(requestOptions); - if (this.debug) { - await logger.logToStderr('Attempt to get AllProperties key values'); - } - - const json: ClientSvcResponse = JSON.parse(res); - const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); - if (contents && contents.ErrorInfo) { - throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; - } - - const allPropertiesObj = json.find(x => { return x['AllProperties']; }); - if (allPropertiesObj) { - return allPropertiesObj['AllProperties']; - } + const res: any = await request.post(requestOptions); + if (this.verbose) { + await logger.logToStderr('Attempt to get AllProperties key values'); + } - throw 'Cannot proceed. AllProperties not found'; // this is not supposed to happen + const json: ClientSvcResponse = JSON.parse(res); + const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); + if (contents && contents.ErrorInfo) { + throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; } - catch (err: any) { - throw err; + + const allPropertiesObj = json.find(x => { return x['AllProperties']; }); + if (allPropertiesObj) { + return allPropertiesObj['AllProperties']; } + + throw 'Cannot proceed. AllProperties not found'; // this is not supposed to happen } /** @@ -157,19 +147,14 @@ export abstract class SpoPropertyBagBaseCommand extends SpoCommand { data: `${formatting.escapeXml(name)}${formatting.escapeXml(value)}` }; - try { - const res: any = await request.post(requestOptions); - const json: ClientSvcResponse = JSON.parse(res); - const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); - if (contents && contents.ErrorInfo) { - throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; - } - else { - return res; - } + const res: any = await request.post(requestOptions); + const json: ClientSvcResponse = JSON.parse(res); + const contents: ClientSvcResponseContents = json.find(x => { return x['ErrorInfo']; }); + if (contents && contents.ErrorInfo) { + throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error'; } - catch (err: any) { - throw err; + else { + return res; } } @@ -182,12 +167,7 @@ export abstract class SpoPropertyBagBaseCommand extends SpoCommand { * @param cmd command instance */ public static async isNoScriptSite(webUrl: string, formDigest: string, webIdentityResp: IdentityResponse, logger: Logger, debug: boolean): Promise { - try { - const basePermissionsResp: BasePermissions = await spo.getEffectiveBasePermissions(webIdentityResp.objectIdentity, webUrl, formDigest, logger, debug); - return basePermissionsResp.has(PermissionKind.AddAndCustomizePages) === false; - } - catch (err) { - throw err; - } + const basePermissionsResp: BasePermissions = await spo.getEffectiveBasePermissions(webIdentityResp.objectIdentity, webUrl, formDigest, logger, debug); + return basePermissionsResp.has(PermissionKind.AddAndCustomizePages) === false; } } \ No newline at end of file diff --git a/src/m365/spo/commands/propertybag/propertybag-get.spec.ts b/src/m365/spo/commands/propertybag/propertybag-get.spec.ts index ed7e338e114..7da7470cb29 100644 --- a/src/m365/spo/commands/propertybag/propertybag-get.spec.ts +++ b/src/m365/spo/commands/propertybag/propertybag-get.spec.ts @@ -61,7 +61,7 @@ describe(commands.PROPERTYBAG_GET, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -616,7 +616,7 @@ describe(commands.PROPERTYBAG_GET, () => { }); it('should properly format date property', () => { - const prop = (command as any).formatProperty('vti_timecreated', '\/Date(2017,10,7,11,29,31,0)\/'); + const prop = (command as any).formatProperty('vti_timecreated', '/Date(2017,10,7,11,29,31,0)/'); assert.strictEqual(prop.key, 'vti_timecreated'); assert.strictEqual(Object.prototype.toString.call(prop.value), '[object Date]'); assert.strictEqual((prop.value as Date).toISOString(), new Date(2017, 10, 7, 11, 29, 31, 0).toISOString()); @@ -674,3 +674,4 @@ describe(commands.PROPERTYBAG_GET, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/propertybag/propertybag-list.spec.ts b/src/m365/spo/commands/propertybag/propertybag-list.spec.ts index 1315f3a55f9..9e0bde4331c 100644 --- a/src/m365/spo/commands/propertybag/propertybag-list.spec.ts +++ b/src/m365/spo/commands/propertybag/propertybag-list.spec.ts @@ -59,7 +59,7 @@ describe(commands.PROPERTYBAG_LIST, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -314,7 +314,7 @@ describe(commands.PROPERTYBAG_LIST, () => { }); it('should properly format date property', () => { - const prop = (command as any).formatProperty('vti_timecreated', '\/Date(2017,10,7,11,29,31,0)\/'); + const prop = (command as any).formatProperty('vti_timecreated', '/Date(2017,10,7,11,29,31,0)/'); assert.strictEqual(prop.key, 'vti_timecreated'); assert.strictEqual(Object.prototype.toString.call(prop.value), '[object Date]'); assert.strictEqual((prop.value as Date).toISOString(), new Date(2017, 10, 7, 11, 29, 31, 0).toISOString()); @@ -368,3 +368,4 @@ describe(commands.PROPERTYBAG_LIST, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/propertybag/propertybag-remove.spec.ts b/src/m365/spo/commands/propertybag/propertybag-remove.spec.ts index f4bf4183d8c..4e8083e3c65 100644 --- a/src/m365/spo/commands/propertybag/propertybag-remove.spec.ts +++ b/src/m365/spo/commands/propertybag/propertybag-remove.spec.ts @@ -62,7 +62,7 @@ describe(commands.PROPERTYBAG_REMOVE, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -507,3 +507,4 @@ describe(commands.PROPERTYBAG_REMOVE, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/propertybag/propertybag-set.spec.ts b/src/m365/spo/commands/propertybag/propertybag-set.spec.ts index 96477865aeb..73b492bbaad 100644 --- a/src/m365/spo/commands/propertybag/propertybag-set.spec.ts +++ b/src/m365/spo/commands/propertybag/propertybag-set.spec.ts @@ -61,7 +61,7 @@ describe(commands.PROPERTYBAG_SET, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -582,3 +582,4 @@ describe(commands.PROPERTYBAG_SET, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.spec.ts b/src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.spec.ts index b526d648b97..a34146df495 100644 --- a/src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.spec.ts +++ b/src/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.spec.ts @@ -188,7 +188,7 @@ describe(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST, () => { }, 13, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequestCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "\/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)\/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" } ] } @@ -234,7 +234,7 @@ describe(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST, () => { }, 13, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequestCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "\/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)\/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" } ] } @@ -276,7 +276,7 @@ describe(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST, () => { }, 13, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequestCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "\/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)\/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" } ] } @@ -317,7 +317,7 @@ describe(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST, () => { }, 13, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequestCollection", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "\/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)\/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipalPermissionRequest", "Id": "/Guid(4dc4c043-25ee-40f2-81d3-b3bf63da7538)/", "Resource": "Microsoft Graph", "ResourceId": "Microsoft Graph", "Scope": "Mail.Read" } ] } @@ -379,3 +379,4 @@ describe(commands.SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST, () => { assert.notStrictEqual(typeof alias, 'undefined'); }); }); + diff --git a/src/m365/spo/commands/site/FlowsPolicy.ts b/src/m365/spo/commands/site/FlowsPolicy.ts index 66abd6cb06e..a3ff5a128c3 100644 --- a/src/m365/spo/commands/site/FlowsPolicy.ts +++ b/src/m365/spo/commands/site/FlowsPolicy.ts @@ -1,5 +1,5 @@ export enum FlowsPolicy { Unknown = 0, Disabled = 1, - Enabled = 2, + Enabled = 2 } \ No newline at end of file diff --git a/src/m365/spo/commands/site/SharingCapabilities.ts b/src/m365/spo/commands/site/SharingCapabilities.ts index 8d3ac74e831..21fb2fab9c0 100644 --- a/src/m365/spo/commands/site/SharingCapabilities.ts +++ b/src/m365/spo/commands/site/SharingCapabilities.ts @@ -2,5 +2,5 @@ export enum SharingCapabilities { Disabled = 0, ExternalUserSharingOnly = 1, ExternalUserAndGuestSharing = 2, - ExistingExternalUserSharingOnly = 3, + ExistingExternalUserSharingOnly = 3 } \ No newline at end of file diff --git a/src/m365/spo/commands/site/site-add.spec.ts b/src/m365/spo/commands/site/site-add.spec.ts index 198e90148f0..1170d54fbaf 100644 --- a/src/m365/spo/commands/site/site-add.spec.ts +++ b/src/m365/spo/commands/site/site-add.spec.ts @@ -1268,7 +1268,7 @@ describe(commands.SITE_ADD, () => { }, 199, { "IsNull": false }, 200, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "\/Date(2018,1,7,19,9,58,513)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "/Date(2018,1,7,19,9,58,513)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 } ]); } @@ -1328,7 +1328,7 @@ describe(commands.SITE_ADD, () => { }, 199, { "IsNull": false }, 200, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "\/Date(2018,1,7,19,9,58,513)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Recycled", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "/Date(2018,1,7,19,9,58,513)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Recycled", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 } ]); } @@ -1448,7 +1448,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -1518,7 +1518,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Invalid", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Invalid", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -1588,7 +1588,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -1658,7 +1658,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -1859,7 +1859,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -1977,7 +1977,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -2069,7 +2069,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -2161,7 +2161,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -2253,7 +2253,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -2300,7 +2300,7 @@ describe(commands.SITE_ADD, () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } @@ -2643,3 +2643,4 @@ describe(commands.SITE_ADD, () => { assert.strictEqual(actual, true); }); }); + diff --git a/src/m365/spo/commands/site/site-list.spec.ts b/src/m365/spo/commands/site/site-list.spec.ts index ead927370f8..221fa46478f 100644 --- a/src/m365/spo/commands/site/site-list.spec.ts +++ b/src/m365/spo/commands/site/site-list.spec.ts @@ -119,9 +119,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -135,9 +135,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: {} }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -159,9 +159,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -175,9 +175,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -199,9 +199,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -215,9 +215,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { type: 'TeamSite' } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -239,9 +239,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -255,9 +255,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { type: 'CommunicationSite' } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -279,9 +279,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": "SPSiteQuery,841cb9d7-61a2-4029-b405-8cef77f591e2,924a239d-6416-49ff-86e2-0283b03bc4aa,0f820ed9-1927-4d48-8f88-94f863949574", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -302,9 +302,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -318,14 +318,14 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: {} }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -347,9 +347,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -363,9 +363,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { output: 'json', webTemplate: 'STS#0' } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fmtest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "GROUP#0", "TimeZoneId": 13, "Title": "Modern site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fmtest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -387,9 +387,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -403,9 +403,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true, webTemplate: 'STS#0' } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -427,9 +427,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -443,9 +443,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true, filter: "Url -like 'ctest'" } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -467,9 +467,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fm365x324230-my.sharepoint.com%2fpersonal%2ffoo_bar_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Foo Bar", "Url": "https:\u002f\u002fm365x324230-my.sharepoint.com\u002fpersonal\u002ffoo_bar_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fm365x324230-my.sharepoint.com%2fpersonal%2ffoo_bar_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Foo Bar", "Url": "https:\u002f\u002fm365x324230-my.sharepoint.com\u002fpersonal\u002ffoo_bar_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -483,9 +483,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true, withOneDriveSites: '1' } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fm365x324230-my.sharepoint.com%2fpersonal%2ffoo_bar_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Foo Bar", "Url": "https:\u002f\u002fm365x324230-my.sharepoint.com\u002fpersonal\u002ffoo_bar_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fm365x324230-my.sharepoint.com%2fpersonal%2ffoo_bar_com", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Foo Bar", "Url": "https:\u002f\u002fm365x324230-my.sharepoint.com\u002fpersonal\u002ffoo_bar_com", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -507,9 +507,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -523,9 +523,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true, webTemplate: 'STS#0', filter: "Url -like 'ctest'" } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Classic site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -547,9 +547,9 @@ describe(commands.SITE_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -563,9 +563,9 @@ describe(commands.SITE_LIST, () => { await command.action(logger, { options: { debug: true, filter: "Url -like ''" } }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "STS#0", "TimeZoneId": 13, "Title": "Team site 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); diff --git a/src/m365/spo/commands/spo-search.spec.ts b/src/m365/spo/commands/spo-search.spec.ts index 85fd41d9d35..0ef49b017e0 100644 --- a/src/m365/spo/commands/spo-search.spec.ts +++ b/src/m365/spo/commands/spo-search.spec.ts @@ -58,7 +58,7 @@ describe(commands.SEARCH, () => { const urlContains = (opts: any, substring: string): boolean => { return opts.url.toUpperCase().indexOf(substring.toUpperCase()) > -1; }; - const filterRows = (rows: ResultTableRow[], key: string, value: string) => { + const filterRows = (rows: ResultTableRow[], key: string, value: string): ResultTableRow[] => { return rows.filter(row => { return row.Cells.filter(cell => { return (cell.Key.toUpperCase() === key.toUpperCase() && cell.Value.toUpperCase() === value.toUpperCase()); @@ -177,7 +177,7 @@ describe(commands.SEARCH, () => { "TriggeredRules": [] }; }; - const getFakes = async (opts: any) => { + const getFakes = async (opts: any): Promise => { if (urlContains(opts, 'QUERYTEXT=\'ISDOCUMENT:1\'')) { const rows = filterRows(fakeRows, 'ISDOCUMENT', 'TRUE'); @@ -199,7 +199,7 @@ describe(commands.SEARCH, () => { executedTest = TestID.QueryDocuments_NoParameterTest; return getQueryResult(rows); } - if (urlContains(opts, `QUERYTEXT=\'ISDOCUMENT:1 INDEXDOCID>0\'`)) { + if (urlContains(opts, `QUERYTEXT='ISDOCUMENT:1 INDEXDOCID>0'`)) { const rows = filterRows(fakeRows, 'ISDOCUMENT', 'TRUE'); if (urlContains(opts, 'ROWLIMIT=500')) { @@ -211,12 +211,12 @@ describe(commands.SEARCH, () => { return getQueryResult([rows[0]], 2); } } - if (urlContains(opts, `QUERYTEXT=\'ISDOCUMENT:1 INDEXDOCID>1\'`)) { + if (urlContains(opts, `QUERYTEXT='ISDOCUMENT:1 INDEXDOCID>1'`)) { const rows = filterRows(fakeRows, 'ISDOCUMENT', 'TRUE'); executedTest = TestID.QueryDocuments_WithDocId1Test; return getQueryResult([rows[1]], 1); } - if (urlContains(opts, `QUERYTEXT=\'ISDOCUMENT:1 INDEXDOCID>2\'`)) { + if (urlContains(opts, `QUERYTEXT='ISDOCUMENT:1 INDEXDOCID>2'`)) { executedTest = TestID.QueryDocuments_WithDocId2Test; return getQueryResult([], 0); } diff --git a/src/m365/spo/commands/storageentity/storageentity-set.spec.ts b/src/m365/spo/commands/storageentity/storageentity-set.spec.ts index 1ad5c3933fa..d286b94c7ec 100644 --- a/src/m365/spo/commands/storageentity/storageentity-set.spec.ts +++ b/src/m365/spo/commands/storageentity/storageentity-set.spec.ts @@ -132,7 +132,7 @@ describe(commands.STORAGEENTITY_SET, () => { throw 'Invalid request'; }); - await command.action(logger, { options: { debug: true, key: '', value: '\"Lorem\"', description: '"ipsum"', comment: '', appCatalogUrl: 'https://contoso.sharepoint.com/sites/appcatalog' } }); + await command.action(logger, { options: { debug: true, key: '', value: '"Lorem"', description: '"ipsum"', comment: '', appCatalogUrl: 'https://contoso.sharepoint.com/sites/appcatalog' } }); assert.strictEqual(postStub.lastCall.args[0].url, 'https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery'); assert.strictEqual(postStub.lastCall.args[0].headers['X-RequestDigest'], 'ABC'); assert.strictEqual(postStub.lastCall.args[0].data, `<Property1>"Lorem""ipsum"<dolor & samet>https://contoso.sharepoint.com/sites/appcatalog`); diff --git a/src/m365/spo/commands/tenant/tenant-applicationcustomizer-set.ts b/src/m365/spo/commands/tenant/tenant-applicationcustomizer-set.ts index 71906710fae..6da4d009581 100644 --- a/src/m365/spo/commands/tenant/tenant-applicationcustomizer-set.ts +++ b/src/m365/spo/commands/tenant/tenant-applicationcustomizer-set.ts @@ -274,8 +274,7 @@ class SpoTenantApplicationCustomizerSetCommand extends SpoCommand { }); } - const requestOptions: CliRequestOptions = - { + const requestOptions: CliRequestOptions = { url: `${appCatalogUrl}/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/Items(${itemId})/ValidateUpdateListItem()`, headers: { 'accept': 'application/json;odata=nometadata' diff --git a/src/m365/spo/commands/tenant/tenant-commandset-set.ts b/src/m365/spo/commands/tenant/tenant-commandset-set.ts index 8d8af47c91a..20d54bad3d2 100644 --- a/src/m365/spo/commands/tenant/tenant-commandset-set.ts +++ b/src/m365/spo/commands/tenant/tenant-commandset-set.ts @@ -197,8 +197,7 @@ class SpoTenantCommandSetSetCommand extends SpoCommand { }); } - const requestOptions: CliRequestOptions = - { + const requestOptions: CliRequestOptions = { url: `${appCatalogUrl}/_api/web/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')/Items(${options.id})/ValidateUpdateListItem()`, headers: { 'accept': 'application/json;odata=nometadata' diff --git a/src/m365/spo/commands/tenant/tenant-recyclebinitem-list.spec.ts b/src/m365/spo/commands/tenant/tenant-recyclebinitem-list.spec.ts index e94b712d629..79e8b376ebb 100644 --- a/src/m365/spo/commands/tenant/tenant-recyclebinitem-list.spec.ts +++ b/src/m365/spo/commands/tenant/tenant-recyclebinitem-list.spec.ts @@ -112,9 +112,9 @@ describe(commands.TENANT_RECYCLEBINITEM_LIST, () => { }, 57, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPODeletedSitePropertiesEnumerable", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,4,3,893)\/", "SiteId": "\/Guid(7db536da-792b-4be7-b9b6-194778905606)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,4,3,893)/", "SiteId": "/Guid(7db536da-792b-4be7-b9b6-194778905606)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,40,58,90)\/", "SiteId": "\/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,40,58,90)/", "SiteId": "/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 } ] } @@ -127,9 +127,9 @@ describe(commands.TENANT_RECYCLEBINITEM_LIST, () => { await command.action(logger, { options: { output: 'json' } }); assert(loggerLogSpy.calledWith([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,4,3,893)\/", "SiteId": "\/Guid(7db536da-792b-4be7-b9b6-194778905606)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,4,3,893)/", "SiteId": "/Guid(7db536da-792b-4be7-b9b6-194778905606)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,40,58,90)\/", "SiteId": "\/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,40,58,90)/", "SiteId": "/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 } ])); }); @@ -148,9 +148,9 @@ describe(commands.TENANT_RECYCLEBINITEM_LIST, () => { }, 57, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPODeletedSitePropertiesEnumerable", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,4,3,893)\/", "SiteId": "\/Guid(7db536da-792b-4be7-b9b6-194778905606)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fClassicThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,4,3,893)/", "SiteId": "/Guid(7db536da-792b-4be7-b9b6-194778905606)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fClassicThrowaway", "UserCodeMaximumLevel": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "\/Date(2020,0,15,11,40,58,90)\/", "SiteId": "\/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "85bb2b9f-5099-2000-af64-2c100126d549|908bed80-a04a-4433-b4a0-883d9847d110:c7d25483-6785-4e76-8b22-9c57c0b70134\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fModernThrowaway", "DaysRemaining": 92, "DeletionTime": "/Date(2020,0,15,11,40,58,90)/", "SiteId": "/Guid(38fb96c1-8e1d-4d24-ad8d-e57cb9b1749e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fModernThrowaway", "UserCodeMaximumLevel": 300 } ] } @@ -187,3 +187,4 @@ describe(commands.TENANT_RECYCLEBINITEM_LIST, () => { await assert.rejects(command.action(logger, { options: {} } as any), new CommandError('Timed out')); }); }); + diff --git a/src/m365/spo/commands/term/term-get.spec.ts b/src/m365/spo/commands/term/term-get.spec.ts index 1fa61dcb819..b7be8a3771a 100644 --- a/src/m365/spo/commands/term/term-get.spec.ts +++ b/src/m365/spo/commands/term/term-get.spec.ts @@ -49,8 +49,8 @@ describe(commands.TERM_GET, () => { "PathOfTerm": "Test Term", "TermsCount": 1 }; - const csomResponseById = [{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.23325.12003", "ErrorInfo": null, "TraceCorrelationId": "8fff93a0-2037-6000-110c-b9eb6618f070" }, 14, { "IsNull": false }, 15, { "_ObjectIdentity_": "8fff93a0-2037-6000-110c-b9eb6618f070|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==" }, 16, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "8fff93a0-2037-6000-110c-b9eb6618f070|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==", "CreatedDate": "\/Date(1675790684037)\/", "Id": "\/Guid(334d792b-0026-4486-a593-a2031b564104)\/", "LastModifiedDate": "\/Date(1675790684037)\/", "Name": "Test Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term", "TermsCount": 1 }]; - const csomResponseByName = [{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.23325.12003", "ErrorInfo": null, "TraceCorrelationId": "47ff93a0-c06c-6000-110c-be1cdced2038" }, 2, { "IsNull": false }, 3, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:ss:" }, 5, { "IsNull": false }, 6, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:st:kTm3XibpGUiE5nxBtVMTfw==" }, 8, { "IsNull": false }, 10, { "IsNull": false }, 11, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:gr:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfg=" }, 13, { "IsNull": false }, 15, { "IsNull": false }, 16, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:se:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmt" }, 18, { "IsNull": false }, 22, { "IsNull": false }, 23, { "_ObjectType_": "SP.Taxonomy.TermCollection", "_Child_Items_": [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==", "CreatedDate": "\/Date(1675790684037)\/", "Id": "\/Guid(334d792b-0026-4486-a593-a2031b564104)\/", "LastModifiedDate": "\/Date(1675790684037)\/", "Name": "Test Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term", "TermsCount": 1 }] }]; + const csomResponseById = [{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.23325.12003", "ErrorInfo": null, "TraceCorrelationId": "8fff93a0-2037-6000-110c-b9eb6618f070" }, 14, { "IsNull": false }, 15, { "_ObjectIdentity_": "8fff93a0-2037-6000-110c-b9eb6618f070|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==" }, 16, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "8fff93a0-2037-6000-110c-b9eb6618f070|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==", "CreatedDate": "/Date(1675790684037)/", "Id": "/Guid(334d792b-0026-4486-a593-a2031b564104)/", "LastModifiedDate": "/Date(1675790684037)/", "Name": "Test Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term", "TermsCount": 1 }]; + const csomResponseByName = [{ "SchemaVersion": "15.0.0.0", "LibraryVersion": "16.0.23325.12003", "ErrorInfo": null, "TraceCorrelationId": "47ff93a0-c06c-6000-110c-be1cdced2038" }, 2, { "IsNull": false }, 3, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:ss:" }, 5, { "IsNull": false }, 6, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:st:kTm3XibpGUiE5nxBtVMTfw==" }, 8, { "IsNull": false }, 10, { "IsNull": false }, 11, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:gr:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfg=" }, 13, { "IsNull": false }, 15, { "IsNull": false }, 16, { "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:se:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmt" }, 18, { "IsNull": false }, 22, { "IsNull": false }, 23, { "_ObjectType_": "SP.Taxonomy.TermCollection", "_Child_Items_": [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "47ff93a0-c06c-6000-110c-be1cdced2038|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtK3lNMyYAhkSlk6IDG1ZBBA==", "CreatedDate": "/Date(1675790684037)/", "Id": "/Guid(334d792b-0026-4486-a593-a2031b564104)/", "LastModifiedDate": "/Date(1675790684037)/", "Name": "Test Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term", "TermsCount": 1 }] }]; //#endregion let log: string[]; @@ -238,7 +238,7 @@ describe(commands.TERM_GET, () => { return defaultValue; }); - const childItems = [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "\/Date(1675790717780)\/", "Id": "\/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)\/", "LastModifiedDate": "\/Date(1675790717780)\/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtNXuY\u002fJxmJ0m9jOekcLeh2w==", "CreatedDate": "\/Date(1675795608853)\/", "Id": "\/Guid(fc987b35-669c-4927-bd8c-e7a470b7a1db)\/", "LastModifiedDate": "\/Date(1675795608853)\/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Child Term", "TermsCount": 0 }]; + const childItems = [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "/Date(1675790717780)/", "Id": "/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)/", "LastModifiedDate": "/Date(1675790717780)/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtNXuY\u002fJxmJ0m9jOekcLeh2w==", "CreatedDate": "/Date(1675795608853)/", "Id": "/Guid(fc987b35-669c-4927-bd8c-e7a470b7a1db)/", "LastModifiedDate": "/Date(1675795608853)/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Child Term", "TermsCount": 0 }]; sinon.stub(request, 'post').callsFake(async (opts) => { if (opts.url === 'https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery' && @@ -261,7 +261,7 @@ describe(commands.TERM_GET, () => { }); it('handles selecting single result when multiple terms with the specified name found and cli is set to prompt', async () => { - const childItems = [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "\/Date(1675790717780)\/", "Id": "\/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)\/", "LastModifiedDate": "\/Date(1675790717780)\/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtNXuY\u002fJxmJ0m9jOekcLeh2w==", "CreatedDate": "\/Date(1675795608853)\/", "Id": "\/Guid(fc987b35-669c-4927-bd8c-e7a470b7a1db)\/", "LastModifiedDate": "\/Date(1675795608853)\/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Child Term", "TermsCount": 0 }]; + const childItems = [{ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "/Date(1675790717780)/", "Id": "/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)/", "LastModifiedDate": "/Date(1675790717780)/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }, { "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtNXuY\u002fJxmJ0m9jOekcLeh2w==", "CreatedDate": "/Date(1675795608853)/", "Id": "/Guid(fc987b35-669c-4927-bd8c-e7a470b7a1db)/", "LastModifiedDate": "/Date(1675795608853)/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Child Term", "TermsCount": 0 }]; sinon.stub(request, 'post').callsFake(async (opts) => { if (opts.url === 'https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery' && @@ -274,7 +274,7 @@ describe(commands.TERM_GET, () => { throw 'Invalid request'; }); - sinon.stub(cli, 'handleMultipleResultsFound').resolves({ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "\/Date(1675790717780)\/", "Id": "\/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)\/", "LastModifiedDate": "\/Date(1675790717780)\/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }); + sinon.stub(cli, 'handleMultipleResultsFound').resolves({ "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "b50094a0-80a4-6000-110c-b074a0d4c336|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf25aOnte4ElDn7uvWBPvXfjuQ1jPsltwT78ny15SLpmtEP0Wk4LJvk+y0GrLwtClew==", "CreatedDate": "/Date(1675790717780)/", "Id": "/Guid(9316fd10-c982-4fbe-b2d0-6acbc2d0a57b)/", "LastModifiedDate": "/Date(1675790717780)/", "Name": "Test Child Term", "CustomProperties": {}, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|joe@contoso.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": false, "IsSourceTerm": true, "LocalCustomProperties": {}, "MergedTermIds": [], "PathOfTerm": "Test Term;Test Child Term", "TermsCount": 0 }); await command.action(logger, { options: { diff --git a/src/m365/spo/commands/term/term-group-add.spec.ts b/src/m365/spo/commands/term/term-group-add.spec.ts index b31bf1f056a..c7b9656c640 100644 --- a/src/m365/spo/commands/term/term-group-add.spec.ts +++ b/src/m365/spo/commands/term/term-group-add.spec.ts @@ -89,7 +89,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -105,7 +105,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)/", "Description": "" } ]); } @@ -137,7 +137,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -153,7 +153,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)/", "Description": "" } ]); } @@ -185,7 +185,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -201,7 +201,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)/", "Description": "" } ]); } @@ -241,7 +241,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -257,7 +257,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)/", "Description": "" } ]); } @@ -298,7 +298,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -314,7 +314,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)/", "Description": "" } ]); } @@ -370,7 +370,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -404,7 +404,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -450,7 +450,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -466,7 +466,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a8)/", "Description": "" } ]); } @@ -504,7 +504,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -520,7 +520,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets>", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets>", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)/", "Description": "" } ]); } @@ -552,7 +552,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 8, { "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==" }, 9, { - "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "\/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)\/", "IsOnline": true, "Languages": [ + "_ObjectType_": "SP.Taxonomy.TermStore", "_ObjectIdentity_": "d94a919e-5076-0000-29c7-0729bb255d69|fec14c62-7c3b-481b-851b-c80d7802b224:st:YU1+cBy9wUuh\u002ffzgFZGpUQ==", "DefaultLanguage": 1033, "Id": "/Guid(707e4d61-bd1c-4bc1-a1fd-fce01591a951)/", "IsOnline": true, "Languages": [ 1033 ], "Name": "Taxonomy_tDB2pT87w98nSRfEZAp8tQ==", "WorkingLanguage": 1033 } @@ -568,7 +568,7 @@ describe(commands.TERM_GROUP_ADD, () => { }, 15, { "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=" }, 16, { - "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "\/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)\/", "Description": "" + "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "d94a919e-0083-0000-29c7-00c65c41f487|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUccStmyWLrlHt8dB3chzeac=", "Name": "PnPTermSets", "Id": "/Guid(6cb612c7-2e96-47b9-b7c7-41ddc87379a7)/", "Description": "" } ]); } diff --git a/src/m365/spo/commands/term/term-group-get.spec.ts b/src/m365/spo/commands/term/term-group-get.spec.ts index e354aa6f30e..c6f0f961699 100644 --- a/src/m365/spo/commands/term/term-group-get.spec.ts +++ b/src/m365/spo/commands/term/term-group-get.spec.ts @@ -120,9 +120,9 @@ describe(commands.TERM_GROUP_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "aa58909e-60c1-0000-29c7-003b321d02d1|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, @@ -190,9 +190,9 @@ describe(commands.TERM_GROUP_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "aa58909e-60c1-0000-29c7-003b321d02d1|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, @@ -260,9 +260,9 @@ describe(commands.TERM_GROUP_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "aa58909e-60c1-0000-29c7-003b321d02d1|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, diff --git a/src/m365/spo/commands/term/term-group-list.spec.ts b/src/m365/spo/commands/term/term-group-list.spec.ts index 0adb0d45ae4..221a752b9a7 100644 --- a/src/m365/spo/commands/term/term-group-list.spec.ts +++ b/src/m365/spo/commands/term/term-group-list.spec.ts @@ -117,9 +117,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, @@ -128,9 +128,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+s=", - "CreatedDate": "\/Date(1536839573117)\/", - "Id": "\/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)\/", - "LastModifiedDate": "\/Date(1536839573117)\/", + "CreatedDate": "/Date(1536839573117)/", + "Id": "/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)/", + "LastModifiedDate": "/Date(1536839573117)/", "Name": "PnPTermSets", "Description": "", "IsSiteCollectionGroup": false, @@ -139,9 +139,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUTdqe9gByDZKkEZiltR3nIc=", - "CreatedDate": "\/Date(1529479401063)\/", - "Id": "\/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)\/", - "LastModifiedDate": "\/Date(1529479401063)\/", + "CreatedDate": "/Date(1529479401063)/", + "Id": "/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)/", + "LastModifiedDate": "/Date(1529479401063)/", "Name": "Search Dictionaries", "Description": "", "IsSiteCollectionGroup": false, @@ -150,9 +150,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUdrlarEXoGtNuzIB3A5zZDo=", - "CreatedDate": "\/Date(1529479400770)\/", - "Id": "\/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)\/", - "LastModifiedDate": "\/Date(1529479400770)\/", + "CreatedDate": "/Date(1529479400770)/", + "Id": "/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)/", + "LastModifiedDate": "/Date(1529479400770)/", "Name": "Site Collection - contoso.sharepoint.com-search", "Description": "", "IsSiteCollectionGroup": true, @@ -161,9 +161,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQZhmdVzct1Fj6MAalJ1aHc=", - "CreatedDate": "\/Date(1529495406027)\/", - "Id": "\/Guid(d5996106-7273-45dd-8fa3-006a52756877)\/", - "LastModifiedDate": "\/Date(1529495406027)\/", + "CreatedDate": "/Date(1529495406027)/", + "Id": "/Guid(d5996106-7273-45dd-8fa3-006a52756877)/", + "LastModifiedDate": "/Date(1529495406027)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Analytics", "Description": "", "IsSiteCollectionGroup": true, @@ -172,9 +172,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUeAa0tV1fe9PpxZBXc21aYc=", - "CreatedDate": "\/Date(1536754831887)\/", - "Id": "\/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)\/", - "LastModifiedDate": "\/Date(1536754831887)\/", + "CreatedDate": "/Date(1536754831887)/", + "Id": "/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)/", + "LastModifiedDate": "/Date(1536754831887)/", "Name": "Site Collection - contoso.sharepoint.com-sites-hr", "Description": "", "IsSiteCollectionGroup": true, @@ -183,9 +183,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUVSux4Ka74dLrn8bmCVuTp0=", - "CreatedDate": "\/Date(1536754843060)\/", - "Id": "\/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)\/", - "LastModifiedDate": "\/Date(1536754843060)\/", + "CreatedDate": "/Date(1536754843060)/", + "Id": "/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)/", + "LastModifiedDate": "/Date(1536754843060)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Marketing", "Description": "", "IsSiteCollectionGroup": true, @@ -194,9 +194,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpURC8Oohu2K5FoLzWJkLCzM0=", - "CreatedDate": "\/Date(1536754304210)\/", - "Id": "\/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)\/", - "LastModifiedDate": "\/Date(1536754304210)\/", + "CreatedDate": "/Date(1536754304210)/", + "Id": "/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)/", + "LastModifiedDate": "/Date(1536754304210)/", "Name": "Site Collection - contoso.sharepoint.com-sites-portal", "Description": "", "IsSiteCollectionGroup": true, @@ -205,9 +205,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUYWJl\u002fqvH5hPrfM1Rk4nNTU=", - "CreatedDate": "\/Date(1529479155453)\/", - "Id": "\/Guid(fa978985-1faf-4f98-adf3-35464e273535)\/", - "LastModifiedDate": "\/Date(1529479155453)\/", + "CreatedDate": "/Date(1529479155453)/", + "Id": "/Guid(fa978985-1faf-4f98-adf3-35464e273535)/", + "LastModifiedDate": "/Date(1529479155453)/", "Name": "System", "Description": "These term sets are used by the system itself.", "IsSiteCollectionGroup": false, @@ -363,9 +363,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, @@ -374,9 +374,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+s=", - "CreatedDate": "\/Date(1536839573117)\/", - "Id": "\/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)\/", - "LastModifiedDate": "\/Date(1536839573117)\/", + "CreatedDate": "/Date(1536839573117)/", + "Id": "/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)/", + "LastModifiedDate": "/Date(1536839573117)/", "Name": "PnPTermSets", "Description": "", "IsSiteCollectionGroup": false, @@ -385,9 +385,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUTdqe9gByDZKkEZiltR3nIc=", - "CreatedDate": "\/Date(1529479401063)\/", - "Id": "\/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)\/", - "LastModifiedDate": "\/Date(1529479401063)\/", + "CreatedDate": "/Date(1529479401063)/", + "Id": "/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)/", + "LastModifiedDate": "/Date(1529479401063)/", "Name": "Search Dictionaries", "Description": "", "IsSiteCollectionGroup": false, @@ -396,9 +396,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUdrlarEXoGtNuzIB3A5zZDo=", - "CreatedDate": "\/Date(1529479400770)\/", - "Id": "\/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)\/", - "LastModifiedDate": "\/Date(1529479400770)\/", + "CreatedDate": "/Date(1529479400770)/", + "Id": "/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)/", + "LastModifiedDate": "/Date(1529479400770)/", "Name": "Site Collection - contoso.sharepoint.com-search", "Description": "", "IsSiteCollectionGroup": true, @@ -407,9 +407,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQZhmdVzct1Fj6MAalJ1aHc=", - "CreatedDate": "\/Date(1529495406027)\/", - "Id": "\/Guid(d5996106-7273-45dd-8fa3-006a52756877)\/", - "LastModifiedDate": "\/Date(1529495406027)\/", + "CreatedDate": "/Date(1529495406027)/", + "Id": "/Guid(d5996106-7273-45dd-8fa3-006a52756877)/", + "LastModifiedDate": "/Date(1529495406027)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Analytics", "Description": "", "IsSiteCollectionGroup": true, @@ -418,9 +418,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUeAa0tV1fe9PpxZBXc21aYc=", - "CreatedDate": "\/Date(1536754831887)\/", - "Id": "\/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)\/", - "LastModifiedDate": "\/Date(1536754831887)\/", + "CreatedDate": "/Date(1536754831887)/", + "Id": "/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)/", + "LastModifiedDate": "/Date(1536754831887)/", "Name": "Site Collection - contoso.sharepoint.com-sites-hr", "Description": "", "IsSiteCollectionGroup": true, @@ -429,9 +429,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUVSux4Ka74dLrn8bmCVuTp0=", - "CreatedDate": "\/Date(1536754843060)\/", - "Id": "\/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)\/", - "LastModifiedDate": "\/Date(1536754843060)\/", + "CreatedDate": "/Date(1536754843060)/", + "Id": "/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)/", + "LastModifiedDate": "/Date(1536754843060)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Marketing", "Description": "", "IsSiteCollectionGroup": true, @@ -440,9 +440,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpURC8Oohu2K5FoLzWJkLCzM0=", - "CreatedDate": "\/Date(1536754304210)\/", - "Id": "\/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)\/", - "LastModifiedDate": "\/Date(1536754304210)\/", + "CreatedDate": "/Date(1536754304210)/", + "Id": "/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)/", + "LastModifiedDate": "/Date(1536754304210)/", "Name": "Site Collection - contoso.sharepoint.com-sites-portal", "Description": "", "IsSiteCollectionGroup": true, @@ -451,9 +451,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "40bc8e9e-c0f3-0000-2b65-64d3c82fb3d9|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUYWJl\u002fqvH5hPrfM1Rk4nNTU=", - "CreatedDate": "\/Date(1529479155453)\/", - "Id": "\/Guid(fa978985-1faf-4f98-adf3-35464e273535)\/", - "LastModifiedDate": "\/Date(1529479155453)\/", + "CreatedDate": "/Date(1529479155453)/", + "Id": "/Guid(fa978985-1faf-4f98-adf3-35464e273535)/", + "LastModifiedDate": "/Date(1529479155453)/", "Name": "System", "Description": "These term sets are used by the system itself.", "IsSiteCollectionGroup": false, @@ -609,9 +609,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQElpjbqF1pFvtTv+GIkLe8=", - "CreatedDate": "\/Date(1529479401033)\/", - "Id": "\/Guid(36a62501-17ea-455a-bed4-eff862242def)\/", - "LastModifiedDate": "\/Date(1529479401033)\/", + "CreatedDate": "/Date(1529479401033)/", + "Id": "/Guid(36a62501-17ea-455a-bed4-eff862242def)/", + "LastModifiedDate": "/Date(1529479401033)/", "Name": "People", "Description": "", "IsSiteCollectionGroup": false, @@ -620,9 +620,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+s=", - "CreatedDate": "\/Date(1536839573117)\/", - "Id": "\/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)\/", - "LastModifiedDate": "\/Date(1536839573117)\/", + "CreatedDate": "/Date(1536839573117)/", + "Id": "/Guid(0e8f395e-ff58-4d45-9ff7-e331ab728beb)/", + "LastModifiedDate": "/Date(1536839573117)/", "Name": "PnPTermSets", "Description": "", "IsSiteCollectionGroup": false, @@ -631,9 +631,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUTdqe9gByDZKkEZiltR3nIc=", - "CreatedDate": "\/Date(1529479401063)\/", - "Id": "\/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)\/", - "LastModifiedDate": "\/Date(1529479401063)\/", + "CreatedDate": "/Date(1529479401063)/", + "Id": "/Guid(d87b6a37-c801-4a36-9046-6296d4779c87)/", + "LastModifiedDate": "/Date(1529479401063)/", "Name": "Search Dictionaries", "Description": "", "IsSiteCollectionGroup": false, @@ -642,9 +642,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUdrlarEXoGtNuzIB3A5zZDo=", - "CreatedDate": "\/Date(1529479400770)\/", - "Id": "\/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)\/", - "LastModifiedDate": "\/Date(1529479400770)\/", + "CreatedDate": "/Date(1529479400770)/", + "Id": "/Guid(b16ae5da-a017-4d6b-bb32-01dc0e73643a)/", + "LastModifiedDate": "/Date(1529479400770)/", "Name": "Site Collection - contoso.sharepoint.com-search", "Description": "", "IsSiteCollectionGroup": true, @@ -653,9 +653,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUQZhmdVzct1Fj6MAalJ1aHc=", - "CreatedDate": "\/Date(1529495406027)\/", - "Id": "\/Guid(d5996106-7273-45dd-8fa3-006a52756877)\/", - "LastModifiedDate": "\/Date(1529495406027)\/", + "CreatedDate": "/Date(1529495406027)/", + "Id": "/Guid(d5996106-7273-45dd-8fa3-006a52756877)/", + "LastModifiedDate": "/Date(1529495406027)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Analytics", "Description": "", "IsSiteCollectionGroup": true, @@ -664,9 +664,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUeAa0tV1fe9PpxZBXc21aYc=", - "CreatedDate": "\/Date(1536754831887)\/", - "Id": "\/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)\/", - "LastModifiedDate": "\/Date(1536754831887)\/", + "CreatedDate": "/Date(1536754831887)/", + "Id": "/Guid(d5d21ae0-7d75-4fef-a716-415dcdb56987)/", + "LastModifiedDate": "/Date(1536754831887)/", "Name": "Site Collection - contoso.sharepoint.com-sites-hr", "Description": "", "IsSiteCollectionGroup": true, @@ -675,9 +675,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUVSux4Ka74dLrn8bmCVuTp0=", - "CreatedDate": "\/Date(1536754843060)\/", - "Id": "\/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)\/", - "LastModifiedDate": "\/Date(1536754843060)\/", + "CreatedDate": "/Date(1536754843060)/", + "Id": "/Guid(82c7ae54-ef9a-4b87-ae7f-1b98256e4e9d)/", + "LastModifiedDate": "/Date(1536754843060)/", "Name": "Site Collection - contoso.sharepoint.com-sites-Marketing", "Description": "", "IsSiteCollectionGroup": true, @@ -686,9 +686,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpURC8Oohu2K5FoLzWJkLCzM0=", - "CreatedDate": "\/Date(1536754304210)\/", - "Id": "\/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)\/", - "LastModifiedDate": "\/Date(1536754304210)\/", + "CreatedDate": "/Date(1536754304210)/", + "Id": "/Guid(883abc10-d86e-45ae-a0bc-d62642c2cccd)/", + "LastModifiedDate": "/Date(1536754304210)/", "Name": "Site Collection - contoso.sharepoint.com-sites-portal", "Description": "", "IsSiteCollectionGroup": true, @@ -697,9 +697,9 @@ describe(commands.TERM_GROUP_LIST, () => { { "_ObjectType_": "SP.Taxonomy.TermGroup", "_ObjectIdentity_": "dfa8909e-402d-0000-2cdb-e7b0f4389f1c|fec14c62-7c3b-481b-851b-c80d7802b224:gr:YU1+cBy9wUuh\u002ffzgFZGpUYWJl\u002fqvH5hPrfM1Rk4nNTU=", - "CreatedDate": "\/Date(1529479155453)\/", - "Id": "\/Guid(fa978985-1faf-4f98-adf3-35464e273535)\/", - "LastModifiedDate": "\/Date(1529479155453)\/", + "CreatedDate": "/Date(1529479155453)/", + "Id": "/Guid(fa978985-1faf-4f98-adf3-35464e273535)/", + "LastModifiedDate": "/Date(1529479155453)/", "Name": "System", "Description": "These term sets are used by the system itself.", "IsSiteCollectionGroup": false, diff --git a/src/m365/spo/commands/term/term-list.spec.ts b/src/m365/spo/commands/term/term-list.spec.ts index 463aa61fcb6..63540bf0f38 100644 --- a/src/m365/spo/commands/term/term-list.spec.ts +++ b/src/m365/spo/commands/term/term-list.spec.ts @@ -45,7 +45,7 @@ describe(commands.TERM_LIST, () => { }, 87, { "_ObjectType_": "SP.Taxonomy.TermCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7niHPAumMhU6sBKkTpEpdKw==", "CreatedDate": "\/Date(1536839575320)\/", "Id": "\/Guid(02cf219e-8ce9-4e85-ac04-a913a44a5d2b)\/", "LastModifiedDate": "\/Date(1536839575337)\/", "Name": "HR", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7niHPAumMhU6sBKkTpEpdKw==", "CreatedDate": "/Date(1536839575320)/", "Id": "/Guid(02cf219e-8ce9-4e85-ac04-a913a44a5d2b)/", "LastModifiedDate": "/Date(1536839575337)/", "Name": "HR", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": { @@ -53,7 +53,7 @@ describe(commands.TERM_LIST, () => { ], "PathOfTerm": "HR", "TermsCount": 0 }, { - "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7tkN1JPJFMkK56GbFv1PDHg==", "CreatedDate": "\/Date(1536839575477)\/", "Id": "\/Guid(247543b6-45f2-4232-b9e8-66c5bf53c31e)\/", "LastModifiedDate": "\/Date(1536839575490)\/", "Name": "IT", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7tkN1JPJFMkK56GbFv1PDHg==", "CreatedDate": "/Date(1536839575477)/", "Id": "/Guid(247543b6-45f2-4232-b9e8-66c5bf53c31e)/", "LastModifiedDate": "/Date(1536839575490)/", "Name": "IT", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": { @@ -61,7 +61,7 @@ describe(commands.TERM_LIST, () => { ], "PathOfTerm": "IT", "TermsCount": 0 }, { - "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7j2DD\u002f1ASKE2ziDgfrY1GAg==", "CreatedDate": "\/Date(1536839575600)\/", "Id": "\/Guid(ffc3608f-1250-4d28-b388-381fad8d4602)\/", "LastModifiedDate": "\/Date(1536839575617)\/", "Name": "Leadership", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "1e1e969e-7056-0000-2cdb-ea009f6c99c8|fec14c62-7c3b-481b-851b-c80d7802b224:te:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7j2DD\u002f1ASKE2ziDgfrY1GAg==", "CreatedDate": "/Date(1536839575600)/", "Id": "/Guid(ffc3608f-1250-4d28-b388-381fad8d4602)/", "LastModifiedDate": "/Date(1536839575617)/", "Name": "Leadership", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": { @@ -101,7 +101,7 @@ describe(commands.TERM_LIST, () => { }, 87, { "_ObjectType_": "SP.Taxonomy.TermCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "6ede85a0-70c8-6000-02cc-23cfae5cac8f|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf14Jch8b6X1EtvEo9yq4/mCesjVWlBPHRaBqFOZeTRSNHOmHw1O1kkuIa5r3F81zsA==", "CreatedDate": "\/Date(1536839575320)\/", "Id": "\/Guid(c387e91c-b553-4b92-886b-9af717cd73b0)\/", "LastModifiedDate": "\/Date(1536839575337)\/", "Name": "Child 1", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "6ede85a0-70c8-6000-02cc-23cfae5cac8f|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf14Jch8b6X1EtvEo9yq4/mCesjVWlBPHRaBqFOZeTRSNHOmHw1O1kkuIa5r3F81zsA==", "CreatedDate": "/Date(1536839575320)/", "Id": "/Guid(c387e91c-b553-4b92-886b-9af717cd73b0)/", "LastModifiedDate": "/Date(1536839575337)/", "Name": "Child 1", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": { @@ -141,7 +141,7 @@ describe(commands.TERM_LIST, () => { }, 87, { "_ObjectType_": "SP.Taxonomy.TermCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "94ff85a0-d037-6000-02cc-2f3cb55cae2a|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf14Jch8b6X1EtvEo9yq4/mCesjVWlBPHRaBqFOZeTRSN+zepP1QYfkGbYiwj/kPrgw==", "CreatedDate": "\/Date(1536839575320)\/", "Id": "\/Guid(3fa937fb-1854-417e-9b62-2c23fe43eb83)\/", "LastModifiedDate": "\/Date(1536839575337)\/", "Name": "Child 2", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.Term", "_ObjectIdentity_": "94ff85a0-d037-6000-02cc-2f3cb55cae2a|fec14c62-7c3b-481b-851b-c80d7802b224:te:kTm3XibpGUiE5nxBtVMTf14Jch8b6X1EtvEo9yq4/mCesjVWlBPHRaBqFOZeTRSN+zepP1QYfkGbYiwj/kPrgw==", "CreatedDate": "/Date(1536839575320)/", "Id": "/Guid(3fa937fb-1854-417e-9b62-2c23fe43eb83)/", "LastModifiedDate": "/Date(1536839575337)/", "Name": "Child 2", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Description": "", "IsDeprecated": false, "IsKeyword": false, "IsPinned": false, "IsPinnedRoot": false, "IsReused": false, "IsRoot": true, "IsSourceTerm": true, "LocalCustomProperties": { diff --git a/src/m365/spo/commands/term/term-set-add.spec.ts b/src/m365/spo/commands/term/term-set-add.spec.ts index c1db2bc2aef..23de6cb180e 100644 --- a/src/m365/spo/commands/term/term-set-add.spec.ts +++ b/src/m365/spo/commands/term/term-set-add.spec.ts @@ -101,7 +101,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -159,7 +159,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -217,7 +217,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -275,7 +275,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -333,7 +333,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -399,7 +399,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -571,7 +571,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -625,7 +625,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -685,7 +685,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -743,7 +743,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations>", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations>", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations>" @@ -801,7 +801,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -867,7 +867,7 @@ describe(commands.TERM_SET_ADD, () => { }, 47, { "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB" }, 48, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "\/Date(1538418692608)\/", "Id": "\/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)\/", "LastModifiedDate": "\/Date(1538418692608)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "3231949e-109d-0000-2cdb-ef525ee6aff1|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+uhmj+1NR05S4SYfkcF5XMB", "CreatedDate": "/Date(1538418692608)/", "Id": "/Guid(b53f9aa1-1d35-4b39-8498-7e4705e57301)/", "LastModifiedDate": "/Date(1538418692608)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": null, "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@contoso.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -985,4 +985,4 @@ describe(commands.TERM_SET_ADD, () => { const actual = await command.validate({ options: { name: 'PnP-Organizations', termGroupName: 'PnPTermSets', customProperties: '{}' } }, commandInfo); assert.strictEqual(actual, true); }); -}); \ No newline at end of file +}); diff --git a/src/m365/spo/commands/term/term-set-get.spec.ts b/src/m365/spo/commands/term/term-set-get.spec.ts index 5ddcbc1eb2b..1603fbc016f 100644 --- a/src/m365/spo/commands/term/term-set-get.spec.ts +++ b/src/m365/spo/commands/term/term-set-get.spec.ts @@ -73,9 +73,9 @@ describe(commands.TERM_SET_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "2994929e-20f1-0000-2cdb-e577d70db169|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", - "CreatedDate": "\/Date(1536839573337)\/", - "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", - "LastModifiedDate": "\/Date(1536840826883)\/", + "CreatedDate": "/Date(1536839573337)/", + "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", + "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" @@ -308,9 +308,9 @@ describe(commands.TERM_SET_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "2994929e-20f1-0000-2cdb-e577d70db169|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", - "CreatedDate": "\/Date(1536839573337)\/", - "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", - "LastModifiedDate": "\/Date(1536840826883)\/", + "CreatedDate": "/Date(1536839573337)/", + "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", + "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" @@ -411,9 +411,9 @@ describe(commands.TERM_SET_GET, () => { { "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "2994929e-20f1-0000-2cdb-e577d70db169|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", - "CreatedDate": "\/Date(1536839573337)\/", - "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", - "LastModifiedDate": "\/Date(1536840826883)\/", + "CreatedDate": "/Date(1536839573337)/", + "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", + "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" @@ -640,4 +640,4 @@ describe(commands.TERM_SET_GET, () => { } } as any), new CommandError('getRequestDigest error')); }); -}); \ No newline at end of file +}); diff --git a/src/m365/spo/commands/term/term-set-list.spec.ts b/src/m365/spo/commands/term/term-set-list.spec.ts index 6d98f40eab6..012e89a4260 100644 --- a/src/m365/spo/commands/term/term-set-list.spec.ts +++ b/src/m365/spo/commands/term/term-set-list.spec.ts @@ -107,7 +107,7 @@ describe(commands.TERM_SET_LIST, () => { }, 67, { "_ObjectType_": "SP.Taxonomy.TermSetCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "\/Date(1536839573337)\/", "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", "LastModifiedDate": "\/Date(1536840826883)\/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "/Date(1536839573337)/", "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" }, "CustomSortOrder": "a359ee29-cf72-4235-a4ef-1ed96bf4eaea:60d165e6-8cb1-4c20-8fad-80067c4ca767:da7bfb84-008b-48ff-b61f-bfe40da2602f", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-CollabFooter-SharedLinks" @@ -115,7 +115,7 @@ describe(commands.TERM_SET_LIST, () => { ] }, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "\/Date(1536839575147)\/", "Id": "\/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)\/", "LastModifiedDate": "\/Date(1536840827383)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "/Date(1536839575147)/", "Id": "/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)/", "LastModifiedDate": "/Date(1536840827383)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": "02cf219e-8ce9-4e85-ac04-a913a44a5d2b:247543b6-45f2-4232-b9e8-66c5bf53c31e:ffc3608f-1250-4d28-b388-381fad8d4602", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -202,7 +202,7 @@ describe(commands.TERM_SET_LIST, () => { }, 67, { "_ObjectType_": "SP.Taxonomy.TermSetCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "\/Date(1536839573337)\/", "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", "LastModifiedDate": "\/Date(1536840826883)\/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "/Date(1536839573337)/", "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" }, "CustomSortOrder": "a359ee29-cf72-4235-a4ef-1ed96bf4eaea:60d165e6-8cb1-4c20-8fad-80067c4ca767:da7bfb84-008b-48ff-b61f-bfe40da2602f", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-CollabFooter-SharedLinks" @@ -210,7 +210,7 @@ describe(commands.TERM_SET_LIST, () => { ] }, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "\/Date(1536839575147)\/", "Id": "\/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)\/", "LastModifiedDate": "\/Date(1536840827383)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "/Date(1536839575147)/", "Id": "/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)/", "LastModifiedDate": "/Date(1536840827383)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": "02cf219e-8ce9-4e85-ac04-a913a44a5d2b:247543b6-45f2-4232-b9e8-66c5bf53c31e:ffc3608f-1250-4d28-b388-381fad8d4602", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -297,7 +297,7 @@ describe(commands.TERM_SET_LIST, () => { }, 67, { "_ObjectType_": "SP.Taxonomy.TermSetCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "\/Date(1536839573337)\/", "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", "LastModifiedDate": "\/Date(1536840826883)\/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "/Date(1536839573337)/", "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" }, "CustomSortOrder": "a359ee29-cf72-4235-a4ef-1ed96bf4eaea:60d165e6-8cb1-4c20-8fad-80067c4ca767:da7bfb84-008b-48ff-b61f-bfe40da2602f", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-CollabFooter-SharedLinks" @@ -305,7 +305,7 @@ describe(commands.TERM_SET_LIST, () => { ] }, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "\/Date(1536839575147)\/", "Id": "\/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)\/", "LastModifiedDate": "\/Date(1536840827383)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "/Date(1536839575147)/", "Id": "/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)/", "LastModifiedDate": "/Date(1536840827383)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": "02cf219e-8ce9-4e85-ac04-a913a44a5d2b:247543b6-45f2-4232-b9e8-66c5bf53c31e:ffc3608f-1250-4d28-b388-381fad8d4602", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -392,7 +392,7 @@ describe(commands.TERM_SET_LIST, () => { }, 67, { "_ObjectType_": "SP.Taxonomy.TermSetCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "\/Date(1536839573337)\/", "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", "LastModifiedDate": "\/Date(1536840826883)\/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "/Date(1536839573337)/", "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" }, "CustomSortOrder": "a359ee29-cf72-4235-a4ef-1ed96bf4eaea:60d165e6-8cb1-4c20-8fad-80067c4ca767:da7bfb84-008b-48ff-b61f-bfe40da2602f", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-CollabFooter-SharedLinks" @@ -400,7 +400,7 @@ describe(commands.TERM_SET_LIST, () => { ] }, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "\/Date(1536839575147)\/", "Id": "\/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)\/", "LastModifiedDate": "\/Date(1536840827383)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "/Date(1536839575147)/", "Id": "/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)/", "LastModifiedDate": "/Date(1536840827383)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": "02cf219e-8ce9-4e85-ac04-a913a44a5d2b:247543b6-45f2-4232-b9e8-66c5bf53c31e:ffc3608f-1250-4d28-b388-381fad8d4602", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -487,7 +487,7 @@ describe(commands.TERM_SET_LIST, () => { }, 67, { "_ObjectType_": "SP.Taxonomy.TermSetCollection", "_Child_Items_": [ { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "\/Date(1536839573337)\/", "Id": "\/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)\/", "LastModifiedDate": "\/Date(1536840826883)\/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+tHfBZ6NyvQQZTQ6WLBpPLt", "CreatedDate": "/Date(1536839573337)/", "Id": "/Guid(7a167c47-2b37-41d0-94d0-e962c1a4f2ed)/", "LastModifiedDate": "/Date(1536840826883)/", "Name": "PnP-CollabFooter-SharedLinks", "CustomProperties": { "_Sys_Nav_IsNavigationTermSet": "True" }, "CustomSortOrder": "a359ee29-cf72-4235-a4ef-1ed96bf4eaea:60d165e6-8cb1-4c20-8fad-80067c4ca767:da7bfb84-008b-48ff-b61f-bfe40da2602f", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-CollabFooter-SharedLinks" @@ -495,7 +495,7 @@ describe(commands.TERM_SET_LIST, () => { ] }, { - "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "\/Date(1536839575147)\/", "Id": "\/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)\/", "LastModifiedDate": "\/Date(1536840827383)\/", "Name": "PnP-Organizations", "CustomProperties": { + "_ObjectType_": "SP.Taxonomy.TermSet", "_ObjectIdentity_": "ec3f929e-2007-0000-2cdb-ebdf7451c224|fec14c62-7c3b-481b-851b-c80d7802b224:se:YU1+cBy9wUuh\u002ffzgFZGpUV45jw5Y\u002f0VNn\u002ffjMatyi+ts4nkUgBOoQZGDcrxallG7", "CreatedDate": "/Date(1536839575147)/", "Id": "/Guid(1479e26c-1380-41a8-9183-72bc5a9651bb)/", "LastModifiedDate": "/Date(1536840827383)/", "Name": "PnP-Organizations", "CustomProperties": { }, "CustomSortOrder": "02cf219e-8ce9-4e85-ac04-a913a44a5d2b:247543b6-45f2-4232-b9e8-66c5bf53c31e:ffc3608f-1250-4d28-b388-381fad8d4602", "IsAvailableForTagging": true, "Owner": "i:0#.f|membership|admin@m365x035040.onmicrosoft.com", "Contact": "", "Description": "", "IsOpenForTermCreation": false, "Names": { "1033": "PnP-Organizations" @@ -656,3 +656,4 @@ describe(commands.TERM_SET_LIST, () => { await assert.rejects(command.action(logger, { options: { termGroupId: '0e8f395e-ff58-4d45-9ff7-e331ab728beb' } } as any), new CommandError('getRequestDigest error')); }); }); + diff --git a/src/m365/spo/commands/theme/theme-apply.ts b/src/m365/spo/commands/theme/theme-apply.ts index 04c0fadbb65..92c30d29217 100644 --- a/src/m365/spo/commands/theme/theme-apply.ts +++ b/src/m365/spo/commands/theme/theme-apply.ts @@ -180,7 +180,7 @@ class SpoThemeApplyCommand extends SpoCommand { return `{ 'name': '${themeName}' , - 'themeJson': '{\"palette\": {${palette}}}' + 'themeJson': '{"palette": {${palette}}}' }`; } } diff --git a/src/m365/spo/commands/web/web-reindex.spec.ts b/src/m365/spo/commands/web/web-reindex.spec.ts index 6c2e5f8aa9d..fb2e60f2d8a 100644 --- a/src/m365/spo/commands/web/web-reindex.spec.ts +++ b/src/m365/spo/commands/web/web-reindex.spec.ts @@ -191,7 +191,7 @@ describe(commands.WEB_REINDEX, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -280,7 +280,7 @@ describe(commands.WEB_REINDEX, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); @@ -366,7 +366,7 @@ describe(commands.WEB_REINDEX, () => { "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1" }, 20, { "_ObjectType_": "SP.Folder", "_ObjectIdentity_": "93e5499e-00f1-5000-1f36-3ab12512a7e9|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:f3806c23-0c9f-42d3-bc7d-3895acc06dc3:web:5a39e548-b3d7-4090-9cb9-0ce7cd85d2c5:folder:df4291de-226f-4c39-bbcc-df21915f5fc1", "Properties": { - "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "\/Date(2017,10,7,11,29,31,0)\/", "vti_dirlateststamp": "\/Date(2018,1,12,22,34,31,0)\/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "\/Date(2017,10,7,11,29,31,0)\/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" + "_ObjectType_": "SP.PropertyValues", "vti_folderitemcount$ Int32": 0, "vti_level$ Int32": 1, "vti_parentid": "{1C5271C8-DB93-459E-9C18-68FC33EFD856}", "vti_winfileattribs": "00000012", "vti_candeleteversion": "true", "vti_foldersubfolderitemcount$ Int32": 0, "vti_timelastmodified": "/Date(2017,10,7,11,29,31,0)/", "vti_dirlateststamp": "/Date(2018,1,12,22,34,31,0)/", "vti_isscriptable": "false", "vti_isexecutable": "false", "vti_metainfoversion$ Int32": 1, "vti_isbrowsable": "true", "vti_timecreated": "/Date(2017,10,7,11,29,31,0)/", "vti_etag": "\"{DF4291DE-226F-4C39-BBCC-DF21915F5FC1},256\"", "vti_hassubdirs": "true", "vti_docstoreversion$ Int32": 256, "vti_rtag": "rt:DF4291DE-226F-4C39-BBCC-DF21915F5FC1@00000000256", "vti_docstoretype$ Int32": 1, "vti_replid": "rid:{DF4291DE-226F-4C39-BBCC-DF21915F5FC1}" } } ]); diff --git a/src/m365/spo/commands/web/web-reindex.ts b/src/m365/spo/commands/web/web-reindex.ts index 7bb0b94a770..e93deffdbbe 100644 --- a/src/m365/spo/commands/web/web-reindex.ts +++ b/src/m365/spo/commands/web/web-reindex.ts @@ -101,26 +101,21 @@ class SpoWebReindexCommand extends SpoCommand { } private async reindexLists(webUrl: string, requestDigest: string, logger: Logger, webIdentityResp: IdentityResponse): Promise { - try { - if (this.debug) { - await logger.logToStderr(`Retrieving information about lists...`); - } - - const requestOptions: CliRequestOptions = { - url: `${webUrl}/_api/web/lists?$select=NoCrawl,Title,RootFolder/Properties,RootFolder/ServerRelativeUrl&$expand=RootFolder/Properties`, - headers: { - 'accept': 'application/json;odata=nometadata' - }, - responseType: 'json' - }; - - const lists: { value: { NoCrawl: boolean; Title: string; RootFolder: { Properties: any; ServerRelativeUrl: string; } }[] } = await request.get(requestOptions); - const promises: Promise[] = lists.value.map(l => this.reindexList(l, webUrl, requestDigest, webIdentityResp, logger)); - await Promise.all(promises); - } - catch (err) { - throw err; + if (this.debug) { + await logger.logToStderr(`Retrieving information about lists...`); } + + const requestOptions: CliRequestOptions = { + url: `${webUrl}/_api/web/lists?$select=NoCrawl,Title,RootFolder/Properties,RootFolder/ServerRelativeUrl&$expand=RootFolder/Properties`, + headers: { + 'accept': 'application/json;odata=nometadata' + }, + responseType: 'json' + }; + + const lists: { value: { NoCrawl: boolean; Title: string; RootFolder: { Properties: any; ServerRelativeUrl: string; } }[] } = await request.get(requestOptions); + const promises: Promise[] = lists.value.map(l => this.reindexList(l, webUrl, requestDigest, webIdentityResp, logger)); + await Promise.all(promises); } private async reindexList(list: { NoCrawl: boolean; Title: string; RootFolder: { Properties: any; ServerRelativeUrl: string; } }, webUrl: string, requestDigest: string, webIdentityResp: IdentityResponse, logger: Logger): Promise { @@ -131,18 +126,13 @@ class SpoWebReindexCommand extends SpoCommand { return; } - try { - const folderIdentityResp: IdentityResponse = await spo.getFolderIdentity(webIdentityResp.objectIdentity, webUrl, list.RootFolder.ServerRelativeUrl, requestDigest); + const folderIdentityResp: IdentityResponse = await spo.getFolderIdentity(webIdentityResp.objectIdentity, webUrl, list.RootFolder.ServerRelativeUrl, requestDigest); - let searchversion: number = list.RootFolder.Properties.vti_x005f_searchversion || 0; - searchversion++; + let searchversion: number = list.RootFolder.Properties.vti_x005f_searchversion || 0; + searchversion++; - await SpoPropertyBagBaseCommand.setProperty('vti_searchversion', searchversion.toString(), webUrl, requestDigest, folderIdentityResp, logger, this.debug, list.RootFolder.ServerRelativeUrl); - return; - } - catch (err) { - throw (err); - } + await SpoPropertyBagBaseCommand.setProperty('vti_searchversion', searchversion.toString(), webUrl, requestDigest, folderIdentityResp, logger, this.debug, list.RootFolder.ServerRelativeUrl); + return; } } diff --git a/src/m365/spp/commands/contentcenter/contentcenter-list.spec.ts b/src/m365/spp/commands/contentcenter/contentcenter-list.spec.ts index 9f54e930127..9f2a27a1573 100644 --- a/src/m365/spp/commands/contentcenter/contentcenter-list.spec.ts +++ b/src/m365/spp/commands/contentcenter/contentcenter-list.spec.ts @@ -71,7 +71,7 @@ describe(commands.CONTENTCENTER_LIST, () => { it('retrieves list of content centers', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { - if ((opts.url = `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { + if ((opts.url === `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { if (opts.headers && opts.headers['X-RequestDigest'] && opts.headers['X-RequestDigest'] === 'abc' && @@ -86,9 +86,9 @@ describe(commands.CONTENTCENTER_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -102,9 +102,9 @@ describe(commands.CONTENTCENTER_LIST, () => { await command.action(logger, { options: {} }); assert(loggerLogSpy.calledOnceWithExactly([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); @@ -112,7 +112,7 @@ describe(commands.CONTENTCENTER_LIST, () => { it('retrieves list of all content centers when results returned in multiple pages', async () => { const postStub = sinon.stub(request, 'post'); postStub.onFirstCall().callsFake(async (opts) => { - if ((opts.url = `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { + if ((opts.url === `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { if (opts.data === `false00CONTENTCTR#0`) { return JSON.stringify([ { @@ -124,9 +124,9 @@ describe(commands.CONTENTCENTER_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": "SPSiteQuery,841cb9d7-61a2-4029-b405-8cef77f591e2,924a239d-6416-49ff-86e2-0283b03bc4aa,0f820ed9-1927-4d48-8f88-94f863949574", "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -149,9 +149,9 @@ describe(commands.CONTENTCENTER_LIST, () => { }, 5, { "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerable", "NextStartIndex": -1, "NextStartIndexFromSharePoint": null, "_Child_Items_": [ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ] } @@ -163,21 +163,21 @@ describe(commands.CONTENTCENTER_LIST, () => { await command.action(logger, { options: {} }); assert(loggerLogSpy.calledOnceWith([ { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,4,12,28,997)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_101", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,4,12,28,997)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 25574400, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 101", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_101", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 }, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "\/Date(2017,11,17,17,46,0,910)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "487c379e-80f8-4000-80be-1d37a4995717|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fctest_1010", "AllowDownloadingNonWebViewableFiles": false, "AllowEditing": false, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 2, "DisableAppViews": 0, "DisableCompanyWideSharingLinks": 0, "DisableFlows": 0, "HasHolds": false, "LastContentModifiedDate": "/Date(2017,11,17,17,46,0,910)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "", "OwnerEmail": null, "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 0, "SharingAllowedDomainList": null, "SharingBlockedDomainList": null, "SharingCapability": 1, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 1048576, "StorageQuotaType": null, "StorageUsage": 1, "StorageWarningLevel": 1022361, "Template": "CONTENTCTR#0", "TimeZoneId": 13, "Title": "Content Center 1010", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fctest_1010", "UserCodeMaximumLevel": 300, "UserCodeWarningLevel": 200, "WebsCount": 0 } ])); }); it('correctly handles error when retrieving sites', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { - if ((opts.url = `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { + if ((opts.url === `https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery`)) { if (opts.data === `false00CONTENTCTR#0`) { return JSON.stringify([ diff --git a/src/m365/teams/commands/tab/tab-add.ts b/src/m365/teams/commands/tab/tab-add.ts index 0e406cbd7e0..a649a340c25 100644 --- a/src/m365/teams/commands/tab/tab-add.ts +++ b/src/m365/teams/commands/tab/tab-add.ts @@ -141,9 +141,15 @@ class TeamsTabAddCommand extends GraphCommand { if (options.contentUrl) { requestBody.configuration.contentUrl = options.contentUrl; } - options.entityId ? requestBody.configuration.entityId = options.entityId : null; - options.removeUrl ? requestBody.configuration.removeUrl = options.removeUrl : null; - options.websiteUrl ? requestBody.configuration.websiteUrl = options.websiteUrl : null; + if (options.entityId) { + requestBody.configuration.entityId = options.entityId; + } + if (options.removeUrl) { + requestBody.configuration.removeUrl = options.removeUrl; + } + if (options.websiteUrl) { + requestBody.configuration.websiteUrl = options.websiteUrl; + } Object.keys(options).forEach(key => { if (excludeOptions.indexOf(key) === -1) { requestBody.configuration[key] = `${(options)[key]}`; diff --git a/src/m365/teams/commands/tab/tab-get.ts b/src/m365/teams/commands/tab/tab-get.ts index 1fec70fa711..5163eb07ff5 100644 --- a/src/m365/teams/commands/tab/tab-get.ts +++ b/src/m365/teams/commands/tab/tab-get.ts @@ -8,10 +8,6 @@ import { validation } from '../../../../utils/validation.js'; import GraphCommand from '../../../base/GraphCommand.js'; import commands from '../../commands.js'; -interface ExtendedGroup extends Group { - resourceProvisioningOptions: string[]; -} - interface CommandArgs { options: Options; } diff --git a/src/m365/tenant/commands/people/people-profilecardproperty-list.spec.ts b/src/m365/tenant/commands/people/people-profilecardproperty-list.spec.ts index 2a2b9853a00..880afa15a2e 100644 --- a/src/m365/tenant/commands/people/people-profilecardproperty-list.spec.ts +++ b/src/m365/tenant/commands/people/people-profilecardproperty-list.spec.ts @@ -16,8 +16,7 @@ describe(commands.PEOPLE_PROFILECARDPROPERTY_LIST, () => { const profileCardPropertyName2 = 'customAttribute2'; //#region Mocked responses - const response = - { + const response = { value: [ { directoryPropertyName: profileCardPropertyName1, diff --git a/src/m365/viva/commands/connections/connections-app-create.ts b/src/m365/viva/commands/connections/connections-app-create.ts index af50f6bc1e9..498dc8c906f 100644 --- a/src/m365/viva/commands/connections/connections-app-create.ts +++ b/src/m365/viva/commands/connections/connections-app-create.ts @@ -124,7 +124,7 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand { const appPortalUrl: string = `${args.options.portalUrl}${args.options.portalUrl.indexOf('?') > -1 ? '&' : '?'}app=portals`; let searchUrlPath: string = portalUrl.hostname; if (portalUrl.pathname.indexOf('/teams') > -1 || portalUrl.pathname.indexOf('/sites') > -1) { - const firstTwoUrlSegments = portalUrl.pathname.match(/^\/[^\/]+\/[^\/]+/); + const firstTwoUrlSegments = portalUrl.pathname.match(/^\/[^/]+\/[^/]+/); if (firstTwoUrlSegments) { searchUrlPath += firstTwoUrlSegments[0]; } diff --git a/src/m365/viva/commands/engage/engage-community-user-add.ts b/src/m365/viva/commands/engage/engage-community-user-add.ts index 32d5b2ea08f..23118585d4b 100644 --- a/src/m365/viva/commands/engage/engage-community-user-add.ts +++ b/src/m365/viva/commands/engage/engage-community-user-add.ts @@ -60,7 +60,7 @@ class VivaEngageCommunityUserAddCommand extends GraphCommand { .refine(options => options.ids || options.userNames, { message: 'Specify either of ids or userNames.' }) - .refine(options => typeof options.userNames !== undefined && typeof options.ids !== undefined, { + .refine(options => options.userNames !== undefined || options.ids !== undefined, { message: 'Specify either ids or userNames, but not both.' }); } diff --git a/src/m365/viva/commands/engage/engage-community-user-remove.ts b/src/m365/viva/commands/engage/engage-community-user-remove.ts index 0bcfff36407..fa6f9e5c87e 100644 --- a/src/m365/viva/commands/engage/engage-community-user-remove.ts +++ b/src/m365/viva/commands/engage/engage-community-user-remove.ts @@ -60,7 +60,7 @@ class VivaEngageCommunityUserRemoveCommand extends GraphCommand { .refine(options => options.id || options.userName, { message: 'Specify either of id or userName.' }) - .refine(options => typeof options.userName !== undefined && typeof options.id !== undefined, { + .refine(options => options.userName !== undefined || options.id !== undefined, { message: 'Specify either id or userName, but not both.' }); } diff --git a/src/telemetry.ts b/src/telemetry.ts index 3b5aa079da7..8deb2a5eead 100644 --- a/src/telemetry.ts +++ b/src/telemetry.ts @@ -24,7 +24,9 @@ async function trackTelemetry(object: any): Promise { } await appInsights.flush(); } - catch { } + catch { + // Do nothing + } } export const telemetry = { diff --git a/src/utils/accessToken.ts b/src/utils/accessToken.ts index 04717834321..d1738deac52 100644 --- a/src/utils/accessToken.ts +++ b/src/utils/accessToken.ts @@ -20,6 +20,7 @@ export const accessToken = { isAppOnlyAccessToken = token.idtyp === 'app'; } catch { + // Do nothing } return isAppOnlyAccessToken; @@ -43,6 +44,7 @@ export const accessToken = { tenantId = token.tid; } catch { + // Do nothing } return tenantId; @@ -68,6 +70,7 @@ export const accessToken = { userName = token.upn || token.app_displayname; } catch { + // Do nothing } return userName; @@ -91,6 +94,7 @@ export const accessToken = { userId = token.oid; } catch { + // Do nothing } return userId; diff --git a/src/utils/cache.ts b/src/utils/cache.ts index 6f51c67313c..2a343fb0fd0 100644 --- a/src/utils/cache.ts +++ b/src/utils/cache.ts @@ -34,7 +34,9 @@ export const cache = { // eslint-disable-next-line @typescript-eslint/no-empty-function fs.writeFile(cacheFilePath, value, () => { }); } - catch { } + catch { + // Do nothing + } }, clearExpired(cb?: () => void): void { @@ -68,7 +70,6 @@ export const cache = { // remove files that haven't been accessed in the last 24 hours if (stats.atime.getTime() < Date.now() - 24 * 60 * 60 * 1000) { // we don't need to wait for the file to be deleted - // eslint-disable-next-line @typescript-eslint/no-empty-function fs.unlink(path.join(cacheFolderPath, file), () => { if (cb && index === numFiles - 1) { cb(); diff --git a/src/utils/customAppScope.spec.ts b/src/utils/customAppScope.spec.ts index b794e0d56f0..47d98d82c90 100644 --- a/src/utils/customAppScope.spec.ts +++ b/src/utils/customAppScope.spec.ts @@ -123,7 +123,8 @@ describe('utils/customAppScope', () => { throw 'Invalid Request'; }); - await assert.rejects(customAppScope.getCustomAppScopeByDisplayName(invalidDisplayName)), Error(`The specified custom application scope '${invalidDisplayName}' does not exist.`); + await assert.rejects(customAppScope.getCustomAppScopeByDisplayName(invalidDisplayName), + new Error(`The specified custom application scope '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple custom application scopes were found using getCustomAppScopeByDisplayName', async () => { diff --git a/src/utils/customAppScope.ts b/src/utils/customAppScope.ts index 22bd3dbe75c..0b210f12ad8 100644 --- a/src/utils/customAppScope.ts +++ b/src/utils/customAppScope.ts @@ -37,7 +37,7 @@ export const customAppScope = { const customAppScopes = await odata.getAllItems(url); if (customAppScopes.length === 0) { - throw `The specified custom application scope '${displayName}' does not exist.`; + throw new Error(`The specified custom application scope '${displayName}' does not exist.`); } if (customAppScopes.length > 1) { diff --git a/src/utils/directoryExtension.spec.ts b/src/utils/directoryExtension.spec.ts index 6a2f8011029..6e2a51f605e 100644 --- a/src/utils/directoryExtension.spec.ts +++ b/src/utils/directoryExtension.spec.ts @@ -92,6 +92,7 @@ describe('utils/directoryExtension', () => { throw 'Invalid Request'; }); - await assert.rejects(directoryExtension.getDirectoryExtensionByName(invalidName, appObjectId)), Error(`The specified directory extension '${invalidName}' does not exist.`); + await assert.rejects(directoryExtension.getDirectoryExtensionByName(invalidName, appObjectId), + new Error(`The specified directory extension '${invalidName}' does not exist.`)); }); }); \ No newline at end of file diff --git a/src/utils/directoryExtension.ts b/src/utils/directoryExtension.ts index 067a32711e7..539477633f0 100644 --- a/src/utils/directoryExtension.ts +++ b/src/utils/directoryExtension.ts @@ -21,7 +21,7 @@ export const directoryExtension = { const extensionProperties = await odata.getAllItems(url); if (extensionProperties.length === 0) { - throw `The specified directory extension '${name}' does not exist.`; + throw new Error(`The specified directory extension '${name}' does not exist.`); } // there can be only one directory extension with a given name diff --git a/src/utils/entraAdministrativeUnit.spec.ts b/src/utils/entraAdministrativeUnit.spec.ts index dc5d0f09393..4a7d51db23f 100644 --- a/src/utils/entraAdministrativeUnit.spec.ts +++ b/src/utils/entraAdministrativeUnit.spec.ts @@ -92,7 +92,8 @@ describe('utils/entraAdministrativeUnit', () => { throw 'Invalid Request'; }); - await assert.rejects(entraAdministrativeUnit.getAdministrativeUnitByDisplayName(invalidDisplayName)), Error(`The specified administrative unit '${invalidDisplayName}' does not exist.`); + await assert.rejects(entraAdministrativeUnit.getAdministrativeUnitByDisplayName(invalidDisplayName), + new Error(`The specified administrative unit '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple administrative units were found using getAdministrativeUnitByDisplayName', async () => { diff --git a/src/utils/entraAdministrativeUnit.ts b/src/utils/entraAdministrativeUnit.ts index 9ba407d3c5a..771e1fbabdb 100644 --- a/src/utils/entraAdministrativeUnit.ts +++ b/src/utils/entraAdministrativeUnit.ts @@ -31,7 +31,7 @@ export const entraAdministrativeUnit = { const administrativeUnits = await odata.getAllItems(`${graphResource}/v1.0/directory/administrativeUnits?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'${queryString}`); if (administrativeUnits.length === 0) { - throw `The specified administrative unit '${displayName}' does not exist.`; + throw new Error(`The specified administrative unit '${displayName}' does not exist.`); } if (administrativeUnits.length > 1) { diff --git a/src/utils/entraApp.spec.ts b/src/utils/entraApp.spec.ts index d5c5e37437d..49600f89906 100644 --- a/src/utils/entraApp.spec.ts +++ b/src/utils/entraApp.spec.ts @@ -120,7 +120,8 @@ describe('utils/entraApp', () => { throw 'Invalid Request'; }); - await assert.rejects(entraApp.getAppRegistrationByAppId(appId, ['id', 'displayName'])), Error(`App with appId '${appId}' not found in Microsoft Entra ID`); + await assert.rejects(entraApp.getAppRegistrationByAppId(appId, ['id', 'displayName']), + new Error(`App with appId '${appId}' not found in Microsoft Entra ID.`)); }); it('throws error message when no application was found using getAppRegistrationByAppName', async () => { @@ -132,7 +133,8 @@ describe('utils/entraApp', () => { throw 'Invalid Request'; }); - await assert.rejects(entraApp.getAppRegistrationByAppName(appName, ['id'])), Error(`App with name '${appName}' not found in Microsoft Entra ID`); + await assert.rejects(entraApp.getAppRegistrationByAppName(appName, ['id']), + new Error(`App with name '${appName}' not found in Microsoft Entra ID.`)); }); it('throws error message when multiple applications were found using getAppRegistrationByAppName', async () => { diff --git a/src/utils/entraApp.ts b/src/utils/entraApp.ts index 37696bee93b..42542bd6b1c 100644 --- a/src/utils/entraApp.ts +++ b/src/utils/entraApp.ts @@ -445,7 +445,7 @@ export const entraApp = { const apps = await odata.getAllItems(url); if (apps.length === 0) { - throw `App with appId '${appId}' not found in Microsoft Entra ID`; + throw new Error(`App with appId '${appId}' not found in Microsoft Entra ID.`); } return apps[0]; @@ -460,7 +460,7 @@ export const entraApp = { const apps = await odata.getAllItems(url); if (apps.length === 0) { - throw `App with name '${appName}' not found in Microsoft Entra ID`; + throw new Error(`App with name '${appName}' not found in Microsoft Entra ID.`); } if (apps.length > 1) { diff --git a/src/utils/entraDevice.spec.ts b/src/utils/entraDevice.spec.ts index a600be4dc6b..6e75933274e 100644 --- a/src/utils/entraDevice.spec.ts +++ b/src/utils/entraDevice.spec.ts @@ -75,7 +75,8 @@ describe('utils/entraDevice', () => { sinonUtil.restore(cli.promptForConfirmation); sinon.stub(cli, 'promptForConfirmation').resolves(true); - await assert.rejects(entraDevice.getDeviceByDisplayName(invalidDisplayName)), Error(`The specified device '${invalidDisplayName}' does not exist.`); + await assert.rejects(entraDevice.getDeviceByDisplayName(invalidDisplayName), + new Error(`The specified device '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple devices were found using getDeviceByDisplayName', async () => { @@ -100,6 +101,7 @@ describe('utils/entraDevice', () => { return 'Invalid Request'; }); - await assert.rejects(entraDevice.getDeviceByDisplayName(displayName), Error(`Multiple devices with name '${displayName}' found. Found: ${deviceId}.`)); + await assert.rejects(entraDevice.getDeviceByDisplayName(displayName), + new Error(`Multiple devices with name '${displayName}' found. Found: ${deviceId}.`)); }); }); \ No newline at end of file diff --git a/src/utils/entraDevice.ts b/src/utils/entraDevice.ts index accc33d1476..f1472329b91 100644 --- a/src/utils/entraDevice.ts +++ b/src/utils/entraDevice.ts @@ -16,7 +16,7 @@ export const entraDevice = { const devices = await odata.getAllItems(`${graphResource}/v1.0/devices?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`); if (devices.length === 0) { - throw `The specified device '${displayName}' does not exist.`; + throw new Error(`The specified device '${displayName}' does not exist.`); } if (devices.length > 1) { diff --git a/src/utils/entraServicePrincipal.spec.ts b/src/utils/entraServicePrincipal.spec.ts index ebbbf996e7e..6824e1d34cc 100644 --- a/src/utils/entraServicePrincipal.spec.ts +++ b/src/utils/entraServicePrincipal.spec.ts @@ -18,6 +18,7 @@ describe('utils/entraServicePrincipal', () => { appId: appId, displayName: appName }; + afterEach(() => { sinonUtil.restore([ request.get, @@ -94,7 +95,8 @@ describe('utils/entraServicePrincipal', () => { throw 'Invalid Request'; }); - await assert.rejects(entraServicePrincipal.getServicePrincipalByAppId(appId, 'id')), Error(`App with appId '${appId}' not found in Microsoft Entra ID`); + await assert.rejects(entraServicePrincipal.getServicePrincipalByAppId(appId, 'id'), + new Error(`Service principal with appId '${appId}' not found in Microsoft Entra ID.`)); }); it('throws error message when no service principal was found using getServicePrincipalFromAppName', async () => { @@ -106,7 +108,8 @@ describe('utils/entraServicePrincipal', () => { throw 'Invalid Request'; }); - await assert.rejects(entraServicePrincipal.getServicePrincipalByAppName(appName)), Error(`Service principal with name '${appName}' not found in Microsoft Entra ID`); + await assert.rejects(entraServicePrincipal.getServicePrincipalByAppName(appName), + new Error(`Service principal with name '${appName}' not found in Microsoft Entra ID.`)); }); it('throws error message when multiple service principals were found using getServicePrincipalFromAppName', async () => { @@ -131,7 +134,8 @@ describe('utils/entraServicePrincipal', () => { return 'Invalid Request'; }); - await assert.rejects(entraServicePrincipal.getServicePrincipalByAppName(appName), Error(`Multiple service principals with name '${appName}' found in Microsoft Entra ID. Found: ${servicePrincipalId}, ${secondServicePrincipalId}.`)); + await assert.rejects(entraServicePrincipal.getServicePrincipalByAppName(appName), + new Error(`Multiple service principals with name '${appName}' found in Microsoft Entra ID. Found: ${servicePrincipalId}, ${secondServicePrincipalId}.`)); }); it('correctly get all service principals using getServicePrincipals', async () => { diff --git a/src/utils/entraServicePrincipal.ts b/src/utils/entraServicePrincipal.ts index a60e549ff56..6b158b767eb 100644 --- a/src/utils/entraServicePrincipal.ts +++ b/src/utils/entraServicePrincipal.ts @@ -22,7 +22,7 @@ export const entraServicePrincipal = { const apps = await odata.getAllItems(url); if (apps.length === 0) { - throw `Service principal with appId '${appId}' not found in Microsoft Entra ID`; + throw new Error(`Service principal with appId '${appId}' not found in Microsoft Entra ID.`); } return apps[0]; @@ -44,7 +44,7 @@ export const entraServicePrincipal = { const apps = await odata.getAllItems(url); if (apps.length === 0) { - throw `Service principal with name '${appName}' not found in Microsoft Entra ID`; + throw new Error(`Service principal with name '${appName}' not found in Microsoft Entra ID.`); } if (apps.length > 1) { diff --git a/src/utils/entraUser.spec.ts b/src/utils/entraUser.spec.ts index 6c8cfcef0f4..ff0f98ba129 100644 --- a/src/utils/entraUser.spec.ts +++ b/src/utils/entraUser.spec.ts @@ -37,6 +37,10 @@ describe('utils/entraUser', () => { ]); }); + after(() => { + sinon.restore(); + }); + it('correctly get user id by upn', async () => { sinon.stub(request, 'get').callsFake(async opts => { if (opts.url === `https://graph.microsoft.com/v1.0/users?$filter=userPrincipalName eq '${formatting.encodeQueryParameter(validUserName)}'&$select=Id`) { diff --git a/src/utils/formatting.ts b/src/utils/formatting.ts index 24793fa2e77..c0816408589 100644 --- a/src/utils/formatting.ts +++ b/src/utils/formatting.ts @@ -116,7 +116,7 @@ export const formatting = { openTypesEncoder(value: string): string { return value - .replace(/\%/g, '%25') + .replace(/%/g, '%25') .replace(/\./g, '%2E') .replace(/:/g, '%3A') .replace(/@/g, '%40') diff --git a/src/utils/md.ts b/src/utils/md.ts index b8e61899cac..7c981703a99 100644 --- a/src/utils/md.ts +++ b/src/utils/md.ts @@ -43,7 +43,7 @@ function convertDd(md: string): string { } function convertHyperlinks(md: string): string { - return md.replace(/(?!\[1m)(?!\[22m)\[([^\]]+)\]\(([^\)]+)\)/gm, (match, label: string, url: string) => { + return md.replace(/(?!\[1m)(?!\[22m)\[([^\]]+)\]\(([^)]+)\)/gm, (match, label: string, url: string) => { // if the link is the same as the content, return just the link if (label === url) { return url; @@ -69,7 +69,7 @@ function convertContentTabs(md: string): string { } function convertCodeFences(md: string): string { - const regex = new RegExp('^```.*?(?:\r?\n)(.*?)```(?:\r?\n)', 'gms'); + const regex = /^```.*?(?:\r?\n)(.*?)```(?:\r?\n)/gms; return md.replace(regex, (match, code: string) => { return `${code.replace(/^(.+)$/gm, ' $1')}${EOL}`; }); diff --git a/src/utils/odata.ts b/src/utils/odata.ts index 946861c60fa..9587630d3d9 100644 --- a/src/utils/odata.ts +++ b/src/utils/odata.ts @@ -17,10 +17,13 @@ export interface GraphResponseError { } } +/* eslint-disable no-redeclare */ function getAllItems(url: string): Promise; function getAllItems(options: CliRequestOptions): Promise; function getAllItems(url: string, metadata: 'none' | 'minimal' | 'full'): Promise; +/* eslint-enable no-redeclare */ +// eslint-disable-next-line no-redeclare async function getAllItems(param1: unknown, metadata?: 'none' | 'minimal' | 'full'): Promise { let items: T[] = []; diff --git a/src/utils/planner.ts b/src/utils/planner.ts index 33d7f97082c..e3bf0e8184f 100644 --- a/src/utils/planner.ts +++ b/src/utils/planner.ts @@ -27,7 +27,7 @@ export const planner = { try { return await request.get(requestOptions); } - catch (ex) { + catch { throw Error(`Planner plan with id '${id}' was not found.`); } }, diff --git a/src/utils/powerPlatform.spec.ts b/src/utils/powerPlatform.spec.ts index 45fca433d6e..e8badada1bb 100644 --- a/src/utils/powerPlatform.spec.ts +++ b/src/utils/powerPlatform.spec.ts @@ -445,7 +445,7 @@ describe('utils/powerPlatform', () => { //#region Solutions it('handles selecting single result when multiple solutions with the specified name were found and cli is set to prompt', async () => { sinon.stub(request, 'get').callsFake(async opts => { - if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${validSolutionName}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { + if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq '${validSolutionName}'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { if ((opts.headers?.accept as string)?.indexOf('application/json') === 0) { return MultipleSolutionResponseWithSameName; } @@ -462,7 +462,7 @@ describe('utils/powerPlatform', () => { it('throws error when multiple solutions with same name were found', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { - if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${validSolutionName}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { + if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq '${validSolutionName}'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { if ((opts.headers?.accept as string)?.indexOf('application/json') === 0) { return MultipleSolutionResponseWithSameName; } @@ -477,7 +477,7 @@ describe('utils/powerPlatform', () => { it('throws error when no solution found', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { - if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${validSolutionName}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { + if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq '${validSolutionName}'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { if ((opts.headers?.accept as string)?.indexOf('application/json') === 0) { return ({ "value": [] }); } @@ -497,7 +497,7 @@ describe('utils/powerPlatform', () => { it('retrieves a specific solution with the name parameter', async () => { sinon.stub(request, 'get').callsFake(async opts => { - if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${validSolutionName}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { + if ((opts.url === `https://contoso-dev.api.crm4.dynamics.com/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq '${validSolutionName}'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`)) { if ((opts.headers?.accept as string)?.indexOf('application/json') === 0) { return solutionResponse; } diff --git a/src/utils/powerPlatform.ts b/src/utils/powerPlatform.ts index c735755536a..ce944cdf264 100644 --- a/src/utils/powerPlatform.ts +++ b/src/utils/powerPlatform.ts @@ -74,7 +74,7 @@ export const powerPlatform = { const response = await request.get(requestOptions); return response; } - catch (ex: any) { + catch { throw Error(`The specified Power Page website with id '${id}' does not exist.`); } }, @@ -147,7 +147,7 @@ export const powerPlatform = { */ async getSolutionByName(dynamicsApiUrl: string, name: string): Promise { const requestOptions: CliRequestOptions = { - url: `${dynamicsApiUrl}/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${name}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`, + url: `${dynamicsApiUrl}/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq '${name}'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`, headers: { accept: 'application/json;odata.metadata=none' }, diff --git a/src/utils/roleDefinition.spec.ts b/src/utils/roleDefinition.spec.ts index 53ed514a868..e9fd8a90d20 100644 --- a/src/utils/roleDefinition.spec.ts +++ b/src/utils/roleDefinition.spec.ts @@ -237,7 +237,8 @@ describe('utils/roleDefinition', () => { throw 'Invalid Request'; }); - await assert.rejects(roleDefinition.getRoleDefinitionByDisplayName(invalidDisplayName)), Error(`The specified role definition '${invalidDisplayName}' does not exist.`); + await assert.rejects(roleDefinition.getRoleDefinitionByDisplayName(invalidDisplayName), + new Error(`The specified role definition '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple role definition were found using getDirectoryRoleDefinitionByDisplayName', async () => { @@ -411,7 +412,8 @@ describe('utils/roleDefinition', () => { throw 'Invalid Request'; }); - await assert.rejects(roleDefinition.getExchangeRoleDefinitionByDisplayName(invalidDisplayName)), Error(`The specified role definition '${invalidDisplayName}' does not exist.`); + await assert.rejects(roleDefinition.getExchangeRoleDefinitionByDisplayName(invalidDisplayName), + new Error(`The specified role definition '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple role definition were found using getExchangeRoleDefinitionByDisplayName', async () => { diff --git a/src/utils/roleDefinition.ts b/src/utils/roleDefinition.ts index 56763788501..8edbde8f2f8 100644 --- a/src/utils/roleDefinition.ts +++ b/src/utils/roleDefinition.ts @@ -22,7 +22,7 @@ export const roleDefinition = { const roleDefinitions = await odata.getAllItems(url); if (roleDefinitions.length === 0) { - throw `The specified role definition '${displayName}' does not exist.`; + throw new Error(`The specified role definition '${displayName}' does not exist.`); } if (roleDefinitions.length > 1) { @@ -76,7 +76,7 @@ export const roleDefinition = { const roleDefinitions = await odata.getAllItems(url); if (roleDefinitions.length === 0) { - throw `The specified role definition '${displayName}' does not exist.`; + throw new Error(`The specified role definition '${displayName}' does not exist.`); } if (roleDefinitions.length > 1) { diff --git a/src/utils/spo.spec.ts b/src/utils/spo.spec.ts index 9489c7140ce..8b3fe443258 100644 --- a/src/utils/spo.spec.ts +++ b/src/utils/spo.spec.ts @@ -1056,7 +1056,7 @@ describe('utils/spo', () => { }, 199, { "IsNull": false }, 200, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "\/Date(2018,1,7,19,9,58,513)\/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SiteProperties", "_ObjectIdentity_": "c340489e-80cc-5000-c5b4-01b2ce71e9bf|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "AllowDownloadingNonWebViewableFiles": true, "AllowEditing": true, "AllowSelfServiceUpgrade": true, "AverageResourceUsage": 0, "CommentsOnSitePagesDisabled": false, "CompatibilityLevel": 15, "ConditionalAccessPolicy": 0, "CurrentResourceUsage": 0, "DenyAddAndCustomizePages": 1, "DisableAppViews": 2, "DisableCompanyWideSharingLinks": 2, "DisableFlows": 2, "HasHolds": false, "LastContentModifiedDate": "/Date(2018,1,7,19,9,58,513)/", "Lcid": 1033, "LockIssue": null, "LockState": "Unlock", "NewUrl": "", "Owner": "admin@contoso.onmicrosoft.com", "OwnerEmail": "admin@contoso.onmicrosoft.com", "PWAEnabled": 0, "RestrictedToRegion": 3, "SandboxedCodeActivationCapability": 2, "SharingAllowedDomainList": "", "SharingBlockedDomainList": "", "SharingCapability": 0, "SharingDomainRestrictionMode": 0, "ShowPeoplePickerSuggestionsForGuestUsers": false, "SiteDefinedSharingCapability": 0, "Status": "Active", "StorageMaximumLevel": 26214400, "StorageQuotaType": null, "StorageUsage": 2, "StorageWarningLevel": 25574400, "Template": "STS#0", "TimeZoneId": 4, "Title": "Team", "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0, "UserCodeWarningLevel": 0, "WebsCount": 1 } ]); } @@ -1137,7 +1137,7 @@ describe('utils/spo', () => { }, 181, { "IsNull": false }, 182, { - "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "\/Date(2018,1,7,18,57,20,530)\/", "SiteId": "\/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)\/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 + "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties", "_ObjectIdentity_": "e13c489e-8041-5000-8242-77f6c560fa5e|908bed80-a04a-4433-b4a0-883d9847d110:67753f63-bc14-4012-869e-f808a43fe023\nDeletedSiteProperties\nhttps%3a%2f%2fcontoso.sharepoint.com%2fsites%2fteam", "DaysRemaining": 30, "DeletionTime": "/Date(2018,1,7,18,57,20,530)/", "SiteId": "/Guid(cb09f194-0ee7-4c48-a44f-8c112fff4d4e)/", "Status": "Recycled", "StorageMaximumLevel": 26214400, "Url": "https:\u002f\u002fcontoso.sharepoint.com\u002fsites\u002fteam", "UserCodeMaximumLevel": 0 } ]); } diff --git a/src/utils/spo.ts b/src/utils/spo.ts index 766f5494c1f..ebdc840a1a9 100644 --- a/src/utils/spo.ts +++ b/src/utils/spo.ts @@ -108,12 +108,12 @@ interface CreateFolderCopyJobsOptions { export enum CreateFileCopyJobsNameConflictBehavior { Fail = 0, Replace = 1, - Rename = 2, + Rename = 2 } export enum CreateFolderCopyJobsNameConflictBehavior { Fail = 0, - Rename = 2, + Rename = 2 } interface CreateCopyJobInfo { @@ -363,7 +363,7 @@ export const spo = { try { await auth.storeConnectionInfo(); } - catch (e: any) { + catch { if (debug) { await logger.logToStderr('Error while storing connection info'); } @@ -373,7 +373,7 @@ export const spo = { async getSpoAdminUrl(logger: Logger, debug: boolean): Promise { const spoUrl = await spo.getSpoUrl(logger, debug); - return (spoUrl.replace(/(https:\/\/)([^\.]+)(.*)/, '$1$2-admin$3')); + return (spoUrl.replace(/(https:\/\/)([^.]+)(.*)/, '$1$2-admin$3')); }, async getTenantId(logger: Logger, debug: boolean): Promise { @@ -407,7 +407,7 @@ export const spo = { try { await auth.storeConnectionInfo(); } - catch (e: any) { + catch { if (debug) { await logger.logToStderr('Error while storing connection info'); } @@ -1117,10 +1117,7 @@ export const spo = { } } else { - if (siteDesignId) { - siteDesignId = siteDesignId; - } - else { + if (!siteDesignId) { if (siteDesign) { switch (siteDesign) { case 'Topic': @@ -2102,10 +2099,12 @@ export const spo = { formValues: requestBodyOptions }; - contentTypeName && requestBody.formValues.push({ - FieldName: 'ContentType', - FieldValue: contentTypeName - }); + if (contentTypeName) { + requestBody.formValues.push({ + FieldName: 'ContentType', + FieldValue: contentTypeName + }); + } const requestOptions: CliRequestOptions = { url: `${absoluteListUrl}/items(${itemId})/ValidateUpdateListItem()`, diff --git a/src/utils/urlUtil.ts b/src/utils/urlUtil.ts index 5d9a83aa784..c9befafdc7f 100644 --- a/src/utils/urlUtil.ts +++ b/src/utils/urlUtil.ts @@ -206,7 +206,7 @@ export const urlUtil = { const fullUrl: string = url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url); // Pattern to match SharePoint URLs - const urlPattern = /https:\/\/[\w\-]+\.sharepoint\.com\/(teams|sites|personal)\/([\w\-]+)/; + const urlPattern = /https:\/\/[\w-]+\.sharepoint\.com\/(teams|sites|personal)\/([\w-]+)/; const match = fullUrl.match(urlPattern); diff --git a/src/utils/validation.ts b/src/utils/validation.ts index 8a84fc80dff..138b674d2ab 100644 --- a/src/utils/validation.ts +++ b/src/utils/validation.ts @@ -354,7 +354,7 @@ export const validation = { } const hasInvalidProperties = validThemeProperties.map((property) => { - return theme.hasOwnProperty(property); + return Object.prototype.hasOwnProperty.call(theme, property); }).includes(false); if (hasInvalidProperties) { diff --git a/src/utils/vivaEngage.spec.ts b/src/utils/vivaEngage.spec.ts index f081ec0b459..487e207ff13 100644 --- a/src/utils/vivaEngage.spec.ts +++ b/src/utils/vivaEngage.spec.ts @@ -88,7 +88,8 @@ describe('utils/vivaEngage', () => { throw 'Invalid Request'; }); - await assert.rejects(vivaEngage.getCommunityByDisplayName(invalidDisplayName, ['id'])), Error(`The specified Viva Engage community '${invalidDisplayName}' does not exist.`); + await assert.rejects(vivaEngage.getCommunityByDisplayName(invalidDisplayName, ['id']), + new Error(`The specified Viva Engage community '${invalidDisplayName}' does not exist.`)); }); it('throws error message when multiple communities were found using getCommunityByDisplayName', async () => { @@ -167,7 +168,8 @@ describe('utils/vivaEngage', () => { throw 'Invalid Request'; }); - await assert.rejects(vivaEngage.getCommunityByEntraGroupId(entraGroupId, ['id'])), Error(`The Microsoft Entra group with id '${entraGroupId}' is not associated with any Viva Engage community.`); + await assert.rejects(vivaEngage.getCommunityByEntraGroupId(entraGroupId, ['id']), + new Error(`The Microsoft Entra group with id '${entraGroupId}' is not associated with any Viva Engage community.`)); }); it('correctly gets Entra group ID by community ID using getEntraGroupIdByCommunityId', async () => { @@ -192,7 +194,8 @@ describe('utils/vivaEngage', () => { throw 'Invalid Request'; }); - await assert.rejects(vivaEngage.getCommunityById(communityId, ['groupId'])), Error(`The specified Viva Engage community with ID '${communityId}' does not exist.`); + await assert.rejects(vivaEngage.getCommunityById(communityId, ['groupId']), + new Error(`The specified Viva Engage community with ID '${communityId}' does not exist.`)); }); it('correctly get single role id by name using getRoleIdByName', async () => { diff --git a/src/utils/vivaEngage.ts b/src/utils/vivaEngage.ts index 34ff790c0f5..43474e8e92c 100644 --- a/src/utils/vivaEngage.ts +++ b/src/utils/vivaEngage.ts @@ -23,7 +23,7 @@ export const vivaEngage = { const community = await request.get(requestOptions); if (!community) { - throw `The specified Viva Engage community with ID '${communityId}' does not exist.`; + throw new Error(`The specified Viva Engage community with ID '${communityId}' does not exist.`); } return community; @@ -39,7 +39,7 @@ export const vivaEngage = { const communities = await odata.getAllItems(`https://graph.microsoft.com/v1.0/employeeExperience/communities?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'&$select=${selectProperties.join(',')}`); if (communities.length === 0) { - throw `The specified Viva Engage community '${displayName}' does not exist.`; + throw new Error(`The specified Viva Engage community '${displayName}' does not exist.`); } if (communities.length > 1) { @@ -65,7 +65,7 @@ export const vivaEngage = { const filteredCommunity = communities.find(c => c.groupId === entraGroupId); if (!filteredCommunity) { - throw `The Microsoft Entra group with id '${entraGroupId}' is not associated with any Viva Engage community.`; + throw new Error(`The Microsoft Entra group with id '${entraGroupId}' is not associated with any Viva Engage community.`); } return filteredCommunity;