@adobe/acc-js-sdk 1.1.61 → 1.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.
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-explore.md +173 -0
- package/.cursor/commands/opsx-propose.md +106 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +156 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +114 -0
- package/.cursor/skills/openspec-explore/SKILL.md +288 -0
- package/.cursor/skills/openspec-propose/SKILL.md +110 -0
- package/.eslintrc.js +2 -2
- package/.github/prompts/opsx-apply.prompt.md +149 -0
- package/.github/prompts/opsx-archive.prompt.md +154 -0
- package/.github/prompts/opsx-explore.prompt.md +170 -0
- package/.github/prompts/opsx-propose.prompt.md +103 -0
- package/.github/skills/openspec-apply-change/SKILL.md +156 -0
- package/.github/skills/openspec-archive-change/SKILL.md +114 -0
- package/.github/skills/openspec-explore/SKILL.md +288 -0
- package/.github/skills/openspec-propose/SKILL.md +110 -0
- package/.github/workflows/codeql-analysis.yml +5 -4
- package/.github/workflows/npm-publish.yml +3 -3
- package/AGENTS.md +117 -0
- package/CLAUDE.md +2 -0
- package/MIGRATION.md +10 -0
- package/README.md +6 -2
- package/ai-docs/coding-rules.md +95 -0
- package/ai-docs/tech-stack.md +43 -0
- package/babel.config.js +5 -0
- package/docs/changeLog.html +34 -0
- package/docs/checkList.html +2 -2
- package/docs/connectionParameters.html +5 -0
- package/docs/quickstart.html +2 -1
- package/docs/release.html +1 -1
- package/openspec/config.yaml +20 -0
- package/package-lock.json +7437 -3924
- package/package.json +9 -7
- package/src/AGENTS.md +98 -0
- package/src/CLAUDE.md +2 -0
- package/src/application.js +637 -637
- package/src/cache.js +133 -133
- package/src/cacheRefresher.js +190 -190
- package/src/campaign.js +532 -532
- package/src/client.js +1539 -1532
- package/src/crypto.js +52 -52
- package/src/domUtil.js +346 -346
- package/src/entityAccessor.js +61 -61
- package/src/index.js +83 -83
- package/src/methodCache.js +69 -69
- package/src/optionCache.js +26 -26
- package/src/soap.js +321 -322
- package/src/testUtil.js +13 -13
- package/src/transport.js +70 -70
- package/src/util.js +147 -147
- package/src/web/bundler.js +5 -5
- package/src/xtkCaster.js +258 -258
- package/src/xtkEntityCache.js +34 -34
- package/src/xtkJob.js +185 -185
- package/test/AGENTS.md +37 -0
- package/test/CLAUDE.md +2 -0
- package/test/cacheRefresher.test.js +7 -0
- package/test/client.test.js +123 -81
- package/test/jest.config.js +6 -0
- package/test/observability.test.js +6 -1
- package/test/xtkJob.test.js +2 -2
package/src/optionCache.js
CHANGED
|
@@ -10,18 +10,18 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
(function() {
|
|
13
|
-
"use strict";
|
|
13
|
+
"use strict";
|
|
14
14
|
|
|
15
|
-
/**********************************************************************************
|
|
15
|
+
/**********************************************************************************
|
|
16
16
|
*
|
|
17
17
|
* A cache for option values
|
|
18
18
|
*
|
|
19
19
|
*********************************************************************************/
|
|
20
|
-
const XtkCaster = require('./xtkCaster.js').XtkCaster;
|
|
21
|
-
const { Cache } = require('./cache.js');
|
|
20
|
+
const XtkCaster = require('./xtkCaster.js').XtkCaster;
|
|
21
|
+
const { Cache } = require('./cache.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
25
|
* @namespace Campaign
|
|
26
26
|
*
|
|
27
27
|
* @typedef {Option} XtkOption
|
|
@@ -32,13 +32,13 @@ const { Cache } = require('./cache.js');
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
36
|
* @private
|
|
37
37
|
* @class
|
|
38
38
|
* @constructor
|
|
39
39
|
* @memberof Campaign
|
|
40
40
|
*/
|
|
41
|
-
class OptionCache extends Cache {
|
|
41
|
+
class OptionCache extends Cache {
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* A in-memory cache for xtk option values. Not intended to be used directly,
|
|
@@ -52,8 +52,8 @@ class OptionCache extends Cache {
|
|
|
52
52
|
* @param {string} rootKey is an optional root key to use for the storage object
|
|
53
53
|
* @param {number} ttl is the TTL for objects in ms. Defaults to 5 mins
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
constructor(storage, rootKey, ttl) {
|
|
56
|
+
super(storage, rootKey, ttl);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -66,7 +66,7 @@ class OptionCache extends Cache {
|
|
|
66
66
|
* is the data type of the option. Such an array is returned by the xtk:session#GetOption method
|
|
67
67
|
*/
|
|
68
68
|
async cache(schemaId, methodName) {
|
|
69
|
-
|
|
69
|
+
return this.put(schemaId, methodName);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
@@ -77,16 +77,16 @@ class OptionCache extends Cache {
|
|
|
77
77
|
* is the data type of the option. Such an array is returned by the xtk:session#GetOption method
|
|
78
78
|
*/
|
|
79
79
|
async put(name, rawValueAndtype) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
var value = null;
|
|
81
|
+
var type = 0;
|
|
82
|
+
var rawValue;
|
|
83
|
+
if (rawValueAndtype && rawValueAndtype[1] != 0) {
|
|
84
|
+
rawValue = rawValueAndtype[0];
|
|
85
|
+
type = rawValueAndtype[1];
|
|
86
|
+
value = XtkCaster.as(rawValue, type);
|
|
87
|
+
}
|
|
88
|
+
await super.put(name, { value:value, type:type, rawValue:rawValue });
|
|
89
|
+
return value;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -96,8 +96,8 @@ class OptionCache extends Cache {
|
|
|
96
96
|
* @returns {*} the option value
|
|
97
97
|
*/
|
|
98
98
|
async get(name) {
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
const option = await super.get(name);
|
|
100
|
+
return option ? option.value : undefined;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -107,12 +107,12 @@ class OptionCache extends Cache {
|
|
|
107
107
|
* @returns {Campaign.XtkOption} the option
|
|
108
108
|
*/
|
|
109
109
|
async getOption(name) {
|
|
110
|
-
|
|
110
|
+
return await super.get(name);
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
// Public exports
|
|
116
|
-
exports.OptionCache = OptionCache;
|
|
115
|
+
// Public exports
|
|
116
|
+
exports.OptionCache = OptionCache;
|
|
117
117
|
|
|
118
118
|
})();
|