@uniformdev/cli 19.158.0 → 19.159.1-alpha.9
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/dist/chunk-2TESILZJ.mjs +267 -0
- package/dist/defaultConfig.d.mts +46 -0
- package/dist/defaultConfig.mjs +51 -0
- package/dist/index-CwNHvz9G.d.mts +48 -0
- package/dist/index.d.mts +1 -47
- package/dist/index.mjs +106 -349
- package/package.json +19 -9
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined")
|
|
5
|
+
return require.apply(this, arguments);
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.43.2_postcss@8.4.38_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
|
|
10
|
+
import { fileURLToPath } from "url";
|
|
11
|
+
import path from "path";
|
|
12
|
+
var getFilename = () => fileURLToPath(import.meta.url);
|
|
13
|
+
var getDirname = () => path.dirname(getFilename());
|
|
14
|
+
var __dirname = /* @__PURE__ */ getDirname();
|
|
15
|
+
|
|
16
|
+
// src/sync/util.ts
|
|
17
|
+
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
18
|
+
import { dump, load } from "js-yaml";
|
|
19
|
+
import { dirname, extname, isAbsolute, resolve, sep } from "path";
|
|
20
|
+
import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
21
|
+
function withConfiguration(yargs) {
|
|
22
|
+
return yargs.option("serialization", {
|
|
23
|
+
skipValidation: true,
|
|
24
|
+
hidden: true
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function withApiOptions(yargs) {
|
|
28
|
+
return yargs.option("apiKey", {
|
|
29
|
+
describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
|
|
30
|
+
default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
|
|
31
|
+
process.env.CANVAS_CLI_API_KEY ?? // deprecated
|
|
32
|
+
process.env.UPM_CLI_API_KEY ?? process.env.UNIFORM_API_KEY,
|
|
33
|
+
demandOption: true,
|
|
34
|
+
type: "string"
|
|
35
|
+
}).option("apiHost", {
|
|
36
|
+
describe: "Uniform host. Defaults to UNIFORM_CLI_BASE_URL env var or https://uniform.app. Supports dotenv.",
|
|
37
|
+
default: process.env.UNIFORM_CLI_BASE_URL || "https://uniform.app",
|
|
38
|
+
demandOption: true,
|
|
39
|
+
type: "string"
|
|
40
|
+
}).option("edgeApiHost", {
|
|
41
|
+
describe: "Uniform edge host. Defaults to UNIFORM_CLI_BASE_EDGE_URL env var or https://uniform.global. Supports dotenv.",
|
|
42
|
+
default: process.env.UNIFORM_CLI_BASE_EDGE_URL || "https://uniform.global",
|
|
43
|
+
demandOption: true,
|
|
44
|
+
type: "string"
|
|
45
|
+
}).option("proxy", {
|
|
46
|
+
describe: "HTTPS proxy to use for Uniform API calls. Defaults to HTTPS_PROXY, https_proxy, ALL_PROXY, or all_proxy env vars (in that order). Supports dotenv.",
|
|
47
|
+
default: process.env.HTTPS_PROXY || process.env.https_proxy || process.env.ALL_PROXY || process.env.all_proxy,
|
|
48
|
+
type: "string"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function nodeFetchProxy(proxy) {
|
|
52
|
+
if (proxy) {
|
|
53
|
+
console.log(`\u{1F991} Using proxy ${proxy}`);
|
|
54
|
+
}
|
|
55
|
+
const wrappedFetch = (input, init) => {
|
|
56
|
+
if (proxy) {
|
|
57
|
+
const wrappedInit = {
|
|
58
|
+
...init,
|
|
59
|
+
dispatcher: new ProxyAgent(proxy)
|
|
60
|
+
};
|
|
61
|
+
return undiciFetch(input, wrappedInit);
|
|
62
|
+
}
|
|
63
|
+
return undiciFetch(input, init);
|
|
64
|
+
};
|
|
65
|
+
return wrappedFetch;
|
|
66
|
+
}
|
|
67
|
+
function withProjectOptions(yargs) {
|
|
68
|
+
return yargs.option("project", {
|
|
69
|
+
describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
|
|
70
|
+
default: process.env.UNIFORM_CLI_PROJECT_ID ?? // deprecated
|
|
71
|
+
process.env.CANVAS_CLI_PROJECT_ID ?? // deprecated
|
|
72
|
+
process.env.UPM_CLI_PROJECT_ID ?? process.env.UNIFORM_PROJECT_ID,
|
|
73
|
+
demandOption: true,
|
|
74
|
+
type: "string",
|
|
75
|
+
alias: ["p"]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function withTeamOptions(yargs) {
|
|
79
|
+
return yargs.option("team", {
|
|
80
|
+
describe: "Uniform team ID. Defaults to UNIFORM_CLI_TEAM_ID or UNIFORM_TEAM_ID env. Supports dotenv.",
|
|
81
|
+
default: process.env.UNIFORM_CLI_TEAM_ID ?? process.env.UNIFORM_TEAM_ID,
|
|
82
|
+
demandOption: true,
|
|
83
|
+
type: "string",
|
|
84
|
+
alias: ["p"]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function withFormatOptions(yargs) {
|
|
88
|
+
return yargs.option("format", {
|
|
89
|
+
alias: ["f"],
|
|
90
|
+
describe: "Output format",
|
|
91
|
+
default: "yaml",
|
|
92
|
+
choices: ["yaml", "json"],
|
|
93
|
+
type: "string"
|
|
94
|
+
}).option("filename", {
|
|
95
|
+
alias: ["o"],
|
|
96
|
+
describe: "Output filename. If not specified, write to stdout.",
|
|
97
|
+
type: "string"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function withDiffOptions(yargs) {
|
|
101
|
+
return yargs.option("diff", {
|
|
102
|
+
describe: "Whether to show diffs in stdout. off = no diffs; update = on for updates; on = updates, creates, deletes. Can be set by UNIFORM_CLI_DIFF_MODE environment variable.",
|
|
103
|
+
default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
|
|
104
|
+
type: "string",
|
|
105
|
+
choices: ["off", "update", "on"],
|
|
106
|
+
alias: ["d"]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function isPathAPackageFile(path2) {
|
|
110
|
+
const extension = extname(path2);
|
|
111
|
+
return extension === ".yaml" || extension === ".yml" || extension === ".json";
|
|
112
|
+
}
|
|
113
|
+
function emitWithFormat(object, format, filename) {
|
|
114
|
+
let content;
|
|
115
|
+
if (filename && !format) {
|
|
116
|
+
const extension = extname(filename);
|
|
117
|
+
if (extension === ".yaml" || extension === ".yml") {
|
|
118
|
+
format = "yaml";
|
|
119
|
+
} else if (extension === ".json") {
|
|
120
|
+
format = "json";
|
|
121
|
+
}
|
|
122
|
+
} else if (!format) {
|
|
123
|
+
throw new Error("Format must be specified when no filename is passed");
|
|
124
|
+
}
|
|
125
|
+
switch (format) {
|
|
126
|
+
case "json":
|
|
127
|
+
content = JSON.stringify(object, null, 2);
|
|
128
|
+
break;
|
|
129
|
+
case "yaml":
|
|
130
|
+
content = dump(object);
|
|
131
|
+
if ("$schema" in object) {
|
|
132
|
+
content = `# yaml-language-server: $schema=<${object["$schema"]}>
|
|
133
|
+
${content}`;
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
throw new Error(`Unsupported format: ${format}`);
|
|
138
|
+
}
|
|
139
|
+
if (filename) {
|
|
140
|
+
const directory = dirname(filename);
|
|
141
|
+
mkDirByPathSync(directory);
|
|
142
|
+
writeFileSync(filename, content, "utf8");
|
|
143
|
+
} else {
|
|
144
|
+
console.log(content);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function mkDirByPathSync(targetDir, { isRelativeToScript = false } = {}) {
|
|
148
|
+
const initDir = isAbsolute(targetDir) ? sep : "";
|
|
149
|
+
const baseDir = isRelativeToScript ? __dirname : ".";
|
|
150
|
+
return targetDir.split(sep).reduce((parentDir, childDir) => {
|
|
151
|
+
const curDir = resolve(baseDir, parentDir, childDir);
|
|
152
|
+
try {
|
|
153
|
+
mkdirSync(curDir);
|
|
154
|
+
} catch (err) {
|
|
155
|
+
if (err.code === "EEXIST") {
|
|
156
|
+
return curDir;
|
|
157
|
+
}
|
|
158
|
+
if (err.code === "ENOENT") {
|
|
159
|
+
throw new Error(`EACCES: permission denied, mkdir '${parentDir}'`);
|
|
160
|
+
}
|
|
161
|
+
const caughtErr = ["EACCES", "EPERM", "EISDIR"].indexOf(err.code) > -1;
|
|
162
|
+
if (!caughtErr || caughtErr && curDir === resolve(targetDir)) {
|
|
163
|
+
throw err;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return curDir;
|
|
167
|
+
}, initDir);
|
|
168
|
+
}
|
|
169
|
+
function readFileToObject(filename) {
|
|
170
|
+
const file = readFileSync(filename, "utf8");
|
|
171
|
+
return load(file, { filename, json: true });
|
|
172
|
+
}
|
|
173
|
+
async function* paginateAsync(fetchPage, options) {
|
|
174
|
+
const perPage = options.pageSize || 100;
|
|
175
|
+
let offset = 0;
|
|
176
|
+
let pageData = [];
|
|
177
|
+
do {
|
|
178
|
+
pageData = await fetchPage(offset, perPage);
|
|
179
|
+
for (const item of pageData) {
|
|
180
|
+
yield item;
|
|
181
|
+
}
|
|
182
|
+
offset += perPage;
|
|
183
|
+
} while (pageData.length === perPage);
|
|
184
|
+
}
|
|
185
|
+
var defaultSyncConfiguration = {
|
|
186
|
+
entitiesConfig: {},
|
|
187
|
+
directory: "uniform-data",
|
|
188
|
+
allowEmptySource: false,
|
|
189
|
+
format: "yaml",
|
|
190
|
+
mode: "mirror"
|
|
191
|
+
};
|
|
192
|
+
var applyDefaultSyncConfiguration = (config) => {
|
|
193
|
+
const mergedConfig = {
|
|
194
|
+
serialization: {
|
|
195
|
+
...defaultSyncConfiguration,
|
|
196
|
+
...config?.serialization ?? {},
|
|
197
|
+
entitiesConfig: {
|
|
198
|
+
...defaultSyncConfiguration.entitiesConfig,
|
|
199
|
+
...config?.serialization?.entitiesConfig ?? {}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
for (const entityType in mergedConfig.serialization.entitiesConfig) {
|
|
204
|
+
const entityTypeCasted = entityType;
|
|
205
|
+
const entityConfig = mergedConfig.serialization.entitiesConfig[entityTypeCasted];
|
|
206
|
+
if (Object.keys(entityConfig).length === 0) {
|
|
207
|
+
const separator = mergedConfig.serialization.directory[mergedConfig.serialization.directory.length - 1] === "/" ? "" : "/";
|
|
208
|
+
mergedConfig.serialization.entitiesConfig[entityTypeCasted].directory = isPathAPackageFile(
|
|
209
|
+
mergedConfig.serialization.directory
|
|
210
|
+
) ? mergedConfig.serialization.directory : `${mergedConfig.serialization.directory}${separator}${entityTypeCasted}`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return mergedConfig;
|
|
214
|
+
};
|
|
215
|
+
var getEntityOption = ({
|
|
216
|
+
optionName,
|
|
217
|
+
config,
|
|
218
|
+
entityType,
|
|
219
|
+
operation
|
|
220
|
+
}) => {
|
|
221
|
+
if (config.entitiesConfig[entityType]?.[operation]?.[optionName]) {
|
|
222
|
+
return config.entitiesConfig[entityType]?.[operation]?.[optionName];
|
|
223
|
+
}
|
|
224
|
+
if (config.entitiesConfig[entityType]?.[optionName]) {
|
|
225
|
+
return config.entitiesConfig[entityType]?.[optionName];
|
|
226
|
+
}
|
|
227
|
+
if (config[optionName]) {
|
|
228
|
+
return config[optionName];
|
|
229
|
+
}
|
|
230
|
+
throw `No ${optionName} option specified for ${entityType} ${operation}`;
|
|
231
|
+
};
|
|
232
|
+
var getDirectoryOrFilename = ({
|
|
233
|
+
config,
|
|
234
|
+
entityType,
|
|
235
|
+
operation,
|
|
236
|
+
defaultEntityFolderName = entityType
|
|
237
|
+
}) => {
|
|
238
|
+
if (config.entitiesConfig[entityType]?.[operation]?.directory) {
|
|
239
|
+
return config.entitiesConfig[entityType]?.[operation]?.directory;
|
|
240
|
+
}
|
|
241
|
+
if (config.entitiesConfig[entityType]?.directory) {
|
|
242
|
+
return config.entitiesConfig[entityType]?.directory;
|
|
243
|
+
}
|
|
244
|
+
const isPackage = isPathAPackageFile(config.directory);
|
|
245
|
+
if (isPackage) {
|
|
246
|
+
return config.directory;
|
|
247
|
+
}
|
|
248
|
+
return `${config.directory}/${defaultEntityFolderName}`;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export {
|
|
252
|
+
__require,
|
|
253
|
+
withConfiguration,
|
|
254
|
+
withApiOptions,
|
|
255
|
+
nodeFetchProxy,
|
|
256
|
+
withProjectOptions,
|
|
257
|
+
withTeamOptions,
|
|
258
|
+
withFormatOptions,
|
|
259
|
+
withDiffOptions,
|
|
260
|
+
isPathAPackageFile,
|
|
261
|
+
emitWithFormat,
|
|
262
|
+
readFileToObject,
|
|
263
|
+
paginateAsync,
|
|
264
|
+
applyDefaultSyncConfiguration,
|
|
265
|
+
getEntityOption,
|
|
266
|
+
getDirectoryOrFilename
|
|
267
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { C as CLIConfiguration, E as EntityTypes } from './index-CwNHvz9G.mjs';
|
|
2
|
+
|
|
3
|
+
type UniformConfigAllOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* The default config preset to use as a basis.
|
|
6
|
+
* 'all' - includes all possible serializable entities
|
|
7
|
+
* 'none' - includes no serializable entities, you must define each one
|
|
8
|
+
*
|
|
9
|
+
* NOTE: Uniform may make additive changes to the all preset without being considered a breaking change,
|
|
10
|
+
* in the event new entity types are added.
|
|
11
|
+
*/
|
|
12
|
+
preset: 'all';
|
|
13
|
+
/** Override the default config to customize it. */
|
|
14
|
+
overrides?: {
|
|
15
|
+
/**
|
|
16
|
+
* Override the config for specific entities.
|
|
17
|
+
* Keys defined here will set the config, enabling or overriding the default config.
|
|
18
|
+
*/
|
|
19
|
+
entitiesConfig?: CLIConfiguration['serialization']['entitiesConfig'];
|
|
20
|
+
serializationConfig?: Omit<CLIConfiguration['serialization'], 'entitiesConfig'>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Explicitly disable specific entity types.
|
|
24
|
+
* Useful to create an 'all entities, except' configuration.
|
|
25
|
+
* Note: this is applied last, so it will also disable any entity types enabled by overrides.
|
|
26
|
+
*/
|
|
27
|
+
disableEntities?: EntityTypes[];
|
|
28
|
+
};
|
|
29
|
+
type UniformConfigNoneOptions = {
|
|
30
|
+
/**
|
|
31
|
+
* The default config preset to use as a basis.
|
|
32
|
+
* 'all' - includes all possible serializable entities
|
|
33
|
+
* 'none' - includes no serializable entities, you must define each one
|
|
34
|
+
*/
|
|
35
|
+
preset: 'none';
|
|
36
|
+
/**
|
|
37
|
+
* Provide the configuration to use here.
|
|
38
|
+
*/
|
|
39
|
+
config: CLIConfiguration;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Creates a Uniform CLI configuration.
|
|
43
|
+
*/
|
|
44
|
+
declare function uniformConfig(options: UniformConfigAllOptions | UniformConfigNoneOptions): CLIConfiguration;
|
|
45
|
+
|
|
46
|
+
export { CLIConfiguration, type UniformConfigAllOptions, type UniformConfigNoneOptions, uniformConfig };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./chunk-2TESILZJ.mjs";
|
|
2
|
+
|
|
3
|
+
// src/sync/allSerializableEntitiesConfig.ts
|
|
4
|
+
var allSerializableEntitiesConfig = {
|
|
5
|
+
dataType: {},
|
|
6
|
+
locale: {},
|
|
7
|
+
category: {},
|
|
8
|
+
redirect: {},
|
|
9
|
+
component: {},
|
|
10
|
+
projectMapDefinition: {},
|
|
11
|
+
projectMapNode: {},
|
|
12
|
+
contentType: {},
|
|
13
|
+
composition: { publish: true },
|
|
14
|
+
entry: { publish: true },
|
|
15
|
+
entryPattern: { publish: true },
|
|
16
|
+
componentPattern: { publish: true },
|
|
17
|
+
asset: {},
|
|
18
|
+
workflow: {},
|
|
19
|
+
aggregate: {},
|
|
20
|
+
enrichment: {},
|
|
21
|
+
prompt: {},
|
|
22
|
+
quirk: {},
|
|
23
|
+
signal: {},
|
|
24
|
+
test: {}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// src/defaultConfig.ts
|
|
28
|
+
function uniformConfig(options) {
|
|
29
|
+
if (options.preset === "none") {
|
|
30
|
+
return options.config;
|
|
31
|
+
}
|
|
32
|
+
const { overrides, preset, disableEntities } = options;
|
|
33
|
+
const config = {
|
|
34
|
+
serialization: {
|
|
35
|
+
...overrides?.serializationConfig,
|
|
36
|
+
entitiesConfig: {
|
|
37
|
+
...preset === "all" ? allSerializableEntitiesConfig : {},
|
|
38
|
+
...overrides?.entitiesConfig
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
if (disableEntities) {
|
|
43
|
+
for (const entityType of disableEntities) {
|
|
44
|
+
delete config?.serialization?.entitiesConfig?.[entityType];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return config;
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
uniformConfig
|
|
51
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type CLICompositionState = 'preview' | 'published' | number;
|
|
2
|
+
type StateArgs = {
|
|
3
|
+
state: CLICompositionState;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
7
|
+
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'locale' | 'componentPattern' | 'projectMapDefinition' | 'projectMapNode' | 'prompt' | 'quirk' | 'redirect' | 'signal' | 'test';
|
|
8
|
+
type SyncFileFormat = 'yaml' | 'json';
|
|
9
|
+
type EntityConfiguration = {
|
|
10
|
+
mode?: SyncMode;
|
|
11
|
+
directory?: string;
|
|
12
|
+
format?: SyncFileFormat;
|
|
13
|
+
disabled?: true;
|
|
14
|
+
};
|
|
15
|
+
type EntityWithStateConfiguration = EntityConfiguration & Partial<StateArgs>;
|
|
16
|
+
type PublishableEntitiesConfiguration = EntityWithStateConfiguration & {
|
|
17
|
+
publish?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type SerializationEntitiesConfiguration = Record<EntityTypes | 'pattern', {
|
|
20
|
+
pull?: EntityConfiguration;
|
|
21
|
+
push?: EntityConfiguration;
|
|
22
|
+
} & EntityConfiguration> & {
|
|
23
|
+
composition?: PublishableEntitiesConfiguration;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated will be removed in a future major release. Use the "componentPattern" property instead.
|
|
26
|
+
* It's an alias, so you can safely rename this property.
|
|
27
|
+
*/
|
|
28
|
+
pattern?: PublishableEntitiesConfiguration;
|
|
29
|
+
componentPattern?: PublishableEntitiesConfiguration;
|
|
30
|
+
entry?: PublishableEntitiesConfiguration;
|
|
31
|
+
entryPattern?: PublishableEntitiesConfiguration;
|
|
32
|
+
};
|
|
33
|
+
type SerializationConfiguration = {
|
|
34
|
+
entitiesConfig: Partial<SerializationEntitiesConfiguration>;
|
|
35
|
+
directory: string;
|
|
36
|
+
mode: SyncMode;
|
|
37
|
+
allowEmptySource: boolean;
|
|
38
|
+
format: SyncFileFormat;
|
|
39
|
+
};
|
|
40
|
+
type RecursivePartial<T> = {
|
|
41
|
+
[P in keyof T]?: RecursivePartial<T[P]>;
|
|
42
|
+
};
|
|
43
|
+
type UserDefinedSerializationConfiguration = RecursivePartial<SerializationConfiguration>;
|
|
44
|
+
type CLIConfiguration = {
|
|
45
|
+
serialization: UserDefinedSerializationConfiguration;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type { CLIConfiguration as C, EntityTypes as E };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,48 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
type StateArgs = {
|
|
4
|
-
state: CLICompositionState;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
8
|
-
type EntityTypes = 'aggregate' | 'asset' | 'category' | 'workflow' | 'component' | 'composition' | 'contentType' | 'dataType' | 'enrichment' | 'entry' | 'entryPattern' | 'locale' | 'componentPattern' | 'projectMapDefinition' | 'projectMapNode' | 'prompt' | 'quirk' | 'redirect' | 'signal' | 'test';
|
|
9
|
-
type SyncFileFormat = 'yaml' | 'json';
|
|
10
|
-
type EntityConfiguration = {
|
|
11
|
-
mode?: SyncMode;
|
|
12
|
-
directory?: string;
|
|
13
|
-
format?: SyncFileFormat;
|
|
14
|
-
disabled?: true;
|
|
15
|
-
};
|
|
16
|
-
type EntityWithStateConfiguration = EntityConfiguration & Partial<StateArgs>;
|
|
17
|
-
type PublishableEntitiesConfiguration = EntityWithStateConfiguration & {
|
|
18
|
-
publish?: boolean;
|
|
19
|
-
};
|
|
20
|
-
type SerializationConfiguration = {
|
|
21
|
-
entitiesConfig: Partial<Record<EntityTypes | 'pattern', {
|
|
22
|
-
pull?: EntityConfiguration;
|
|
23
|
-
push?: EntityConfiguration;
|
|
24
|
-
} & EntityConfiguration> & {
|
|
25
|
-
composition?: PublishableEntitiesConfiguration;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated will be removed in a future major release. Use the "componentPattern" property instead.
|
|
28
|
-
* It's an alias, so you can safely rename this property.
|
|
29
|
-
*/
|
|
30
|
-
pattern?: PublishableEntitiesConfiguration;
|
|
31
|
-
componentPattern?: PublishableEntitiesConfiguration;
|
|
32
|
-
entry?: PublishableEntitiesConfiguration;
|
|
33
|
-
entryPattern?: PublishableEntitiesConfiguration;
|
|
34
|
-
}>;
|
|
35
|
-
directory: string;
|
|
36
|
-
mode: SyncMode;
|
|
37
|
-
allowEmptySource: boolean;
|
|
38
|
-
format: SyncFileFormat;
|
|
39
|
-
};
|
|
40
|
-
type RecursivePartial<T> = {
|
|
41
|
-
[P in keyof T]?: RecursivePartial<T[P]>;
|
|
42
|
-
};
|
|
43
|
-
type UserDefinedSerializationConfiguration = RecursivePartial<SerializationConfiguration>;
|
|
44
|
-
type CLIConfiguration = {
|
|
45
|
-
serialization: UserDefinedSerializationConfiguration;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type { CLIConfiguration };
|
|
2
|
+
export { C as CLIConfiguration } from './index-CwNHvz9G.mjs';
|