@adobe/ccweb-add-on-core 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.c8rc.json +7 -1
  2. package/dist/config/inversify.config.d.ts.map +1 -1
  3. package/dist/config/inversify.config.js +4 -2
  4. package/dist/config/inversify.types.d.ts +1 -2
  5. package/dist/config/inversify.types.d.ts.map +1 -1
  6. package/dist/config/inversify.types.js +1 -2
  7. package/dist/models/AddOnListingData.d.ts +1 -1
  8. package/dist/models/AddOnListingData.d.ts.map +1 -1
  9. package/dist/models/PackageJson.js +1 -1
  10. package/dist/models/PreferenceJson.js +1 -1
  11. package/dist/models/index.d.ts +1 -2
  12. package/dist/models/index.d.ts.map +1 -1
  13. package/dist/models/index.js +0 -2
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/utilities/CLIProcess.d.ts +1 -2
  16. package/dist/utilities/CLIProcess.d.ts.map +1 -1
  17. package/dist/utilities/ConsoleLogger.d.ts +1 -2
  18. package/dist/utilities/ConsoleLogger.d.ts.map +1 -1
  19. package/dist/utilities/Logger.d.ts +13 -1
  20. package/dist/utilities/Logger.d.ts.map +1 -1
  21. package/dist/utilities/Process.d.ts +21 -1
  22. package/dist/utilities/Process.d.ts.map +1 -1
  23. package/dist/utilities/{CLIPreferences.d.ts → UserPreferences.d.ts} +2 -3
  24. package/dist/utilities/UserPreferences.d.ts.map +1 -0
  25. package/dist/utilities/{CLIPreferences.js → UserPreferences.js} +5 -5
  26. package/dist/utilities/index.d.ts +3 -4
  27. package/dist/utilities/index.d.ts.map +1 -1
  28. package/dist/utilities/index.js +1 -4
  29. package/package.json +5 -5
  30. package/src/config/inversify.config.ts +6 -3
  31. package/src/config/inversify.types.ts +2 -4
  32. package/src/models/AddOnListingData.ts +1 -1
  33. package/src/models/PackageJson.ts +1 -1
  34. package/src/models/PreferenceJson.ts +1 -1
  35. package/src/models/index.ts +1 -2
  36. package/src/test/models/TemplateJson.spec.ts +1 -1
  37. package/src/test/utilities/CLIProcess.spec.ts +3 -3
  38. package/src/test/utilities/ConsoleLogger.spec.ts +2 -2
  39. package/src/test/utilities/UncaughtExceptionHandler.spec.ts +1 -1
  40. package/src/test/utilities/{CLIPreferences.spec.ts → UserPreferences.spec.ts} +14 -15
  41. package/src/utilities/CLIProcess.ts +1 -2
  42. package/src/utilities/ConsoleLogger.ts +1 -2
  43. package/src/utilities/Logger.ts +14 -1
  44. package/src/utilities/Process.ts +25 -1
  45. package/src/utilities/UncaughtExceptionHandler.ts +1 -1
  46. package/src/utilities/{CLIPreferences.ts → UserPreferences.ts} +1 -2
  47. package/src/utilities/index.ts +3 -4
  48. package/dist/models/Types.d.ts +0 -58
  49. package/dist/models/Types.d.ts.map +0 -1
  50. package/dist/models/Types.js +0 -25
  51. package/dist/utilities/CLIPreferences.d.ts.map +0 -1
  52. package/dist/utilities/Preferences.d.ts +0 -41
  53. package/dist/utilities/Preferences.d.ts.map +0 -1
  54. package/dist/utilities/Preferences.js +0 -25
  55. package/src/models/Types.ts +0 -63
  56. package/src/utilities/Preferences.ts +0 -43
@@ -21,12 +21,9 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
- export * from "./CLIPreferences.js";
25
24
  export * from "./CLIProcess.js";
26
25
  export * from "./ConsoleLogger.js";
27
26
  export * from "./Extensions.js";
28
- export * from "./Logger.js";
29
- export * from "./Preferences.js";
30
- export * from "./Process.js";
31
27
  export * from "./UncaughtExceptionHandler.js";
28
+ export * from "./UserPreferences.js";
32
29
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ccweb-add-on-core",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Core libraries for Adobe Creative Cloud Web Add-on.",
@@ -17,7 +17,7 @@
17
17
  "url": "https://github.com/adobe/create-ccweb-add-on"
18
18
  },
19
19
  "dependencies": {
20
- "@swc/helpers": "0.5.12",
20
+ "@swc/helpers": "0.5.17",
21
21
  "application-config-path": "0.1.0",
22
22
  "chalk": "4.1.1",
23
23
  "cross-spawn": "7.0.6",
@@ -27,7 +27,7 @@
27
27
  "reflect-metadata": "0.1.13",
28
28
  "string-template": "1.0.0",
29
29
  "tslib": "2.7.0",
30
- "@adobe/ccweb-add-on-manifest": "3.0.0"
30
+ "@adobe/ccweb-add-on-manifest": "3.2.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/chai": "4.2.14",
@@ -38,7 +38,7 @@
38
38
  "@types/node": "18.18.2",
39
39
  "@types/sinon": "9.0.8",
40
40
  "@types/string-template": "1.0.2",
41
- "c8": "7.7.2",
41
+ "c8": "10.1.3",
42
42
  "chai": "4.3.4",
43
43
  "mocha": "10.0.0",
44
44
  "prettier": "2.8.0",
@@ -54,6 +54,6 @@
54
54
  "ibuild": "tsc",
55
55
  "build": "rushx clean && rushx ibuild",
56
56
  "build:release": "rushx build",
57
- "test": "c8 mocha && c8 check-coverage --lines 100 --functions 100 --branches 100"
57
+ "test": "c8 mocha && c8 check-coverage"
58
58
  }
59
59
  }
@@ -24,8 +24,11 @@
24
24
 
25
25
  import { Container } from "inversify";
26
26
  import "reflect-metadata";
27
- import type { Logger, Preferences, Process } from "../utilities/index.js";
28
- import { CLIPreferences, CLIProcess, ConsoleLogger } from "../utilities/index.js";
27
+ import { CLIProcess } from "../utilities/CLIProcess.js";
28
+ import { ConsoleLogger } from "../utilities/ConsoleLogger.js";
29
+ import type { Logger } from "../utilities/Logger.js";
30
+ import type { Process } from "../utilities/Process.js";
31
+ import { UserPreferences } from "../utilities/UserPreferences.js";
29
32
  import { ITypes } from "./inversify.types.js";
30
33
 
31
34
  const container: Container = new Container();
@@ -34,6 +37,6 @@ container.bind<Logger>(ITypes.Logger).to(ConsoleLogger).inTransientScope();
34
37
 
35
38
  container.bind<Process>(ITypes.Process).to(CLIProcess).inSingletonScope();
36
39
 
37
- container.bind<Preferences>(ITypes.Preferences).to(CLIPreferences).inSingletonScope();
40
+ container.bind<UserPreferences>(ITypes.UserPreferences).to(UserPreferences).inSingletonScope();
38
41
 
39
42
  export { container as IContainer };
@@ -25,11 +25,9 @@
25
25
  export const ITypes: {
26
26
  Logger: symbol;
27
27
  Process: symbol;
28
- Preferences: symbol;
29
- AccountService: symbol;
28
+ UserPreferences: symbol;
30
29
  } = {
31
30
  Logger: Symbol.for("Logger"),
32
31
  Process: Symbol.for("Process"),
33
- Preferences: Symbol.for("Preferences"),
34
- AccountService: Symbol.for("AccountService")
32
+ UserPreferences: Symbol.for("UserPreferences")
35
33
  };
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
- import { ManifestEntrypoint } from "@adobe/ccweb-add-on-manifest";
25
+ import type { ManifestEntrypoint } from "@adobe/ccweb-add-on-manifest";
26
26
 
27
27
  export interface AddOnMetaData {
28
28
  name: string;
@@ -22,7 +22,7 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
- import { getJSONString } from "../utilities/index.js";
25
+ import { getJSONString } from "../utilities/Extensions.js";
26
26
  import { TemplateJson } from "./TemplateJson.js";
27
27
 
28
28
  /**
@@ -23,7 +23,7 @@
23
23
  ********************************************************************************/
24
24
 
25
25
  import { DEFAULT_HOST_NAME } from "../constants.js";
26
- import { getJSONString, isNullOrWhiteSpace, isObject } from "../utilities/index.js";
26
+ import { getJSONString, isNullOrWhiteSpace, isObject } from "../utilities/Extensions.js";
27
27
 
28
28
  /**
29
29
  * SSL related settings.
@@ -22,8 +22,7 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
- export * from "./AddOnListingData.js";
25
+ export type * from "./AddOnListingData.js";
26
26
  export * from "./PackageJson.js";
27
27
  export * from "./PreferenceJson.js";
28
28
  export * from "./TemplateJson.js";
29
- export * from "./Types.js";
@@ -24,7 +24,7 @@
24
24
 
25
25
  import { assert } from "chai";
26
26
  import "mocha";
27
- import { TemplateJson } from "../../models/index.js";
27
+ import { TemplateJson } from "../../models/TemplateJson.js";
28
28
 
29
29
  describe("TemplateJson", () => {
30
30
  describe("constructor ...", () => {
@@ -36,9 +36,9 @@ import type { SinonSandbox } from "sinon";
36
36
  import sinon from "sinon";
37
37
  import type { StubbedInstance } from "ts-sinon";
38
38
  import { stubInterface } from "ts-sinon";
39
- import type { ExecutionResult } from "../../models/Types.js";
40
- import type { Logger, Process } from "../../utilities/index.js";
41
- import { CLIProcess } from "../../utilities/index.js";
39
+ import { CLIProcess } from "../../utilities/CLIProcess.js";
40
+ import type { Logger } from "../../utilities/Logger.js";
41
+ import type { ExecutionResult, Process } from "../../utilities/Process.js";
42
42
 
43
43
  describe("CLIProcess", () => {
44
44
  let sandbox: SinonSandbox;
@@ -27,8 +27,8 @@ import chalk from "chalk";
27
27
  import "mocha";
28
28
  import type { SinonSandbox } from "sinon";
29
29
  import sinon from "sinon";
30
- import type { Logger } from "../../utilities/index.js";
31
- import { ConsoleLogger } from "../../utilities/index.js";
30
+ import { ConsoleLogger } from "../../utilities/ConsoleLogger.js";
31
+ import type { Logger } from "../../utilities/Logger.js";
32
32
 
33
33
  describe("ConsoleLogger", () => {
34
34
  let sandbox: SinonSandbox;
@@ -31,7 +31,7 @@ import type { StubbedInstance } from "ts-sinon";
31
31
  import { stubInterface } from "ts-sinon";
32
32
  import { IContainer, ITypes } from "../../config/index.js";
33
33
  import type { Logger } from "../../utilities/Logger.js";
34
- import { UncaughtExceptionHandler } from "../../utilities/index.js";
34
+ import { UncaughtExceptionHandler } from "../../utilities/UncaughtExceptionHandler.js";
35
35
 
36
36
  describe("UncaughtExceptionHandler", () => {
37
37
  let sandbox: SinonSandbox;
@@ -32,16 +32,15 @@ import type { SinonSandbox } from "sinon";
32
32
  import sinon from "sinon";
33
33
  import { ADD_ON_PREFERENCES_FILE, CCWEB_ADDON_DIRECTORY } from "../../constants.js";
34
34
  import { PreferenceJson } from "../../models/PreferenceJson.js";
35
- import type { Preferences } from "../../utilities/index.js";
36
- import { CLIPreferences } from "../../utilities/index.js";
35
+ import { UserPreferences } from "../../utilities/UserPreferences.js";
37
36
 
38
- describe("CLIPreferences", () => {
37
+ describe("UserPreferences", () => {
39
38
  let sandbox: SinonSandbox;
40
- let cliPreferences: Preferences;
39
+ let preferences: UserPreferences;
41
40
 
42
41
  beforeEach(() => {
43
42
  sandbox = sinon.createSandbox();
44
- cliPreferences = new CLIPreferences();
43
+ preferences = new UserPreferences();
45
44
  });
46
45
 
47
46
  afterEach(() => {
@@ -65,9 +64,9 @@ describe("CLIPreferences", () => {
65
64
  const writeFileStub = sandbox.stub(fs, "writeFileSync");
66
65
  writeFileStub.withArgs(preferenceFilePath, JSON.stringify({}, undefined, 4) + os.EOL).returns();
67
66
 
68
- const preferences = cliPreferences.get();
67
+ const preferenceJson = preferences.get();
69
68
 
70
- assert.deepEqual(new PreferenceJson({}), preferences);
69
+ assert.deepEqual(new PreferenceJson({}), preferenceJson);
71
70
  assert.equal(ensureFileStub.calledOnceWith(preferenceFilePath), true);
72
71
  assert.equal(
73
72
  writeFileStub.calledOnceWith(preferenceFilePath, JSON.stringify({}, undefined, 4) + os.EOL),
@@ -87,8 +86,8 @@ describe("CLIPreferences", () => {
87
86
 
88
87
  sandbox.stub(fs, "readFileSync").withArgs(preferenceFilePath, "utf-8").returns("");
89
88
 
90
- const preferences = cliPreferences.get();
91
- assert.deepEqual(new PreferenceJson({}), preferences);
89
+ const preferenceJson = preferences.get();
90
+ assert.deepEqual(new PreferenceJson({}), preferenceJson);
92
91
  });
93
92
 
94
93
  it(`should return empty preferences if any error is encountered while reading '${ADD_ON_PREFERENCES_FILE}'.`, () => {
@@ -106,8 +105,8 @@ describe("CLIPreferences", () => {
106
105
  .withArgs(preferenceFilePath, "utf-8")
107
106
  .throws(new Error("Unexpected error"));
108
107
 
109
- const preferences = cliPreferences.get();
110
- assert.deepEqual(new PreferenceJson({}), preferences);
108
+ const preferenceJson = preferences.get();
109
+ assert.deepEqual(new PreferenceJson({}), preferenceJson);
111
110
  });
112
111
 
113
112
  it(`should return preferences with values if '${ADD_ON_PREFERENCES_FILE}' exits and has data.`, () => {
@@ -138,13 +137,13 @@ describe("CLIPreferences", () => {
138
137
  const readFileStub = sandbox.stub(fs, "readFileSync");
139
138
  readFileStub.withArgs(preferenceFilePath, "utf-8").returns(JSON.stringify(expectedPreference));
140
139
 
141
- const actualPreference = cliPreferences.get();
140
+ const actualPreference = preferences.get();
142
141
 
143
142
  assert.equal(actualPreference.hasTelemetryConsent, expectedPreference.hasTelemetryConsent);
144
143
  assert.equal(actualPreference.clientId, expectedPreference.clientId);
145
144
  assert.deepEqual(actualPreference.ssl, new Map(Object.entries(expectedPreference.ssl)));
146
145
 
147
- const cachedPreference = cliPreferences.get(true);
146
+ const cachedPreference = preferences.get(true);
148
147
 
149
148
  assert.deepEqual(cachedPreference, actualPreference);
150
149
  assert.equal(fileExistsStub.callCount, 1);
@@ -179,13 +178,13 @@ describe("CLIPreferences", () => {
179
178
 
180
179
  sandbox.stub(fs, "readFileSync").withArgs(preferenceFilePath, "utf-8").returns(JSON.stringify(preference));
181
180
 
182
- const preferenceJson = cliPreferences.get();
181
+ const preferenceJson = preferences.get();
183
182
  preferenceJson.clientId = 123456789;
184
183
 
185
184
  const writeFileStub = sandbox.stub(fs, "writeFileSync");
186
185
  writeFileStub.withArgs(preferenceFilePath, preferenceJson.toJSON() + os.EOL).returns();
187
186
 
188
- cliPreferences.set(preferenceJson);
187
+ preferences.set(preferenceJson);
189
188
 
190
189
  assert.equal(writeFileStub.calledOnceWith(preferenceFilePath, preferenceJson.toJSON() + os.EOL), true);
191
190
  });
@@ -31,9 +31,8 @@ import process from "process";
31
31
  import "reflect-metadata";
32
32
  import format from "string-template";
33
33
  import { ITypes } from "../config/inversify.types.js";
34
- import type { ExecutionResult } from "../models/index.js";
35
34
  import type { Logger } from "./Logger.js";
36
- import type { Process } from "./Process.js";
35
+ import type { ExecutionResult, Process } from "./Process.js";
37
36
 
38
37
  /**
39
38
  * CLI Process implementation class for managing execution of commands.
@@ -25,8 +25,7 @@
25
25
  import type { Chalk } from "chalk";
26
26
  import chalk from "chalk";
27
27
  import { injectable } from "inversify";
28
- import type { LoggerOptions } from "../models/index.js";
29
- import type { Logger } from "./Logger.js";
28
+ import type { Logger, LoggerOptions } from "./Logger.js";
30
29
 
31
30
  /**
32
31
  * Console logger implementation class to handle logging of different levels.
@@ -22,7 +22,20 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
- import type { LoggerOptions } from "../models/index.js";
25
+ /**
26
+ * Logger options.
27
+ */
28
+ export type LoggerOptions = {
29
+ /**
30
+ * Prefix string.
31
+ */
32
+ prefix?: string;
33
+
34
+ /**
35
+ * Postfix string.
36
+ */
37
+ postfix?: string;
38
+ };
26
39
 
27
40
  /**
28
41
  * Logger interface to handle logging of different levels.
@@ -23,7 +23,31 @@
23
23
  ********************************************************************************/
24
24
 
25
25
  import type { ExecSyncOptions } from "child_process";
26
- import type { ExecutionResult } from "../models/index.js";
26
+
27
+ /**
28
+ * Execution result.
29
+ */
30
+ export type ExecutionResult = {
31
+ /**
32
+ * Command which was executed.
33
+ */
34
+ command: string;
35
+
36
+ /**
37
+ * Whether the execution is successful.
38
+ */
39
+ isSuccessful: boolean;
40
+
41
+ /**
42
+ * Data returned from the execution, if any.
43
+ */
44
+ data?: string;
45
+
46
+ /**
47
+ * Error thrown during the execution, if any.
48
+ */
49
+ error?: unknown;
50
+ };
27
51
 
28
52
  /**
29
53
  * Process interface for managing execution of commands.
@@ -24,7 +24,7 @@
24
24
 
25
25
  import process from "process";
26
26
  import { IContainer, ITypes } from "../config/index.js";
27
- import { type Logger } from "./Logger.js";
27
+ import type { Logger } from "./Logger.js";
28
28
 
29
29
  /**
30
30
  * Uncaught exception handler.
@@ -31,13 +31,12 @@ import path from "path";
31
31
  import "reflect-metadata";
32
32
  import { ADD_ON_PREFERENCES_FILE, CCWEB_ADDON_DIRECTORY } from "../constants.js";
33
33
  import { PreferenceJson } from "../models/PreferenceJson.js";
34
- import type { Preferences } from "./Preferences.js";
35
34
 
36
35
  /**
37
36
  * Implementation class for configuring CCWeb Add-on CLI related preferences.
38
37
  */
39
38
  @injectable()
40
- export class CLIPreferences implements Preferences {
39
+ export class UserPreferences {
41
40
  private _cachedPreference?: PreferenceJson;
42
41
 
43
42
  /**
@@ -22,11 +22,10 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
- export * from "./CLIPreferences.js";
26
25
  export * from "./CLIProcess.js";
27
26
  export * from "./ConsoleLogger.js";
28
27
  export * from "./Extensions.js";
29
- export * from "./Logger.js";
30
- export * from "./Preferences.js";
31
- export * from "./Process.js";
28
+ export type * from "./Logger.js";
29
+ export type * from "./Process.js";
32
30
  export * from "./UncaughtExceptionHandler.js";
31
+ export * from "./UserPreferences.js";
@@ -1,58 +0,0 @@
1
- /********************************************************************************
2
- * MIT License
3
-
4
- * © Copyright 2023 Adobe. All rights reserved.
5
-
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- ********************************************************************************/
24
- /**
25
- * Execution result.
26
- */
27
- export type ExecutionResult = {
28
- /**
29
- * Command which was executed.
30
- */
31
- command: string;
32
- /**
33
- * Whether the execution is successful.
34
- */
35
- isSuccessful: boolean;
36
- /**
37
- * Data returned from the execution, if any.
38
- */
39
- data?: string;
40
- /**
41
- * Error thrown during the execution, if any.
42
- */
43
- error?: unknown;
44
- };
45
- /**
46
- * Logger options.
47
- */
48
- export type LoggerOptions = {
49
- /**
50
- * Prefix string.
51
- */
52
- prefix?: string;
53
- /**
54
- * Postfix string.
55
- */
56
- postfix?: string;
57
- };
58
- //# sourceMappingURL=Types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../src/models/Types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,25 +0,0 @@
1
- /********************************************************************************
2
- * MIT License
3
-
4
- * © Copyright 2023 Adobe. All rights reserved.
5
-
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- ********************************************************************************/
24
- export {};
25
- //# sourceMappingURL=Types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CLIPreferences.d.ts","sourceRoot":"","sources":["../../src/utilities/CLIPreferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAQlF,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,qBACa,cAAe,YAAW,WAAW;IAC9C,OAAO,CAAC,iBAAiB,CAAC,CAAiB;IAE3C;;;;OAIG;IACH,GAAG,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,cAAc;IAwBxC;;;OAGG;IACH,GAAG,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAKzC,OAAO,KAAK,mBAAmB,GAE9B;CACJ"}
@@ -1,41 +0,0 @@
1
- /********************************************************************************
2
- * MIT License
3
-
4
- * © Copyright 2023 Adobe. All rights reserved.
5
-
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- ********************************************************************************/
24
- import type { PreferenceJson } from "../models/index.js";
25
- /**
26
- * Preferences interface for managing preferences.
27
- */
28
- export interface Preferences {
29
- /**
30
- * Get the CCWeb Add-on CLI related user preferences.
31
- * @param fromCache - (Optional) Whether to return the cached user preference.
32
- * @returns User preference represented as {@link PreferenceJson}.
33
- */
34
- get(fromCache?: boolean): PreferenceJson;
35
- /**
36
- * Set the CCWeb Add-on CLI related user preferences.
37
- * @param preferenceJson - {@link PreferenceJson} reference.
38
- */
39
- set(preferenceJson: PreferenceJson): void;
40
- }
41
- //# sourceMappingURL=Preferences.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Preferences.d.ts","sourceRoot":"","sources":["../../src/utilities/Preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,GAAG,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAEzC;;;OAGG;IACH,GAAG,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CAC7C"}
@@ -1,25 +0,0 @@
1
- /********************************************************************************
2
- * MIT License
3
-
4
- * © Copyright 2023 Adobe. All rights reserved.
5
-
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- ********************************************************************************/
24
- export {};
25
- //# sourceMappingURL=Preferences.js.map
@@ -1,63 +0,0 @@
1
- /********************************************************************************
2
- * MIT License
3
-
4
- * © Copyright 2023 Adobe. All rights reserved.
5
-
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- ********************************************************************************/
24
-
25
- /**
26
- * Execution result.
27
- */
28
- export type ExecutionResult = {
29
- /**
30
- * Command which was executed.
31
- */
32
- command: string;
33
-
34
- /**
35
- * Whether the execution is successful.
36
- */
37
- isSuccessful: boolean;
38
-
39
- /**
40
- * Data returned from the execution, if any.
41
- */
42
- data?: string;
43
-
44
- /**
45
- * Error thrown during the execution, if any.
46
- */
47
- error?: unknown;
48
- };
49
-
50
- /**
51
- * Logger options.
52
- */
53
- export type LoggerOptions = {
54
- /**
55
- * Prefix string.
56
- */
57
- prefix?: string;
58
-
59
- /**
60
- * Postfix string.
61
- */
62
- postfix?: string;
63
- };