@intelligentgraphics/ig.gfx.packager 3.0.11 → 3.0.13
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/build/bin.mjs +1 -1
- package/build/{cli-381989cc.mjs → cli-b2b70181.mjs} +10 -19
- package/build/cli-b2b70181.mjs.map +1 -0
- package/build/{dependencies-1f665204.mjs → dependencies-dc3442f0.mjs} +2 -2
- package/build/{dependencies-1f665204.mjs.map → dependencies-dc3442f0.mjs.map} +1 -1
- package/build/{generateIndex-074f4aa1.mjs → generateIndex-173ba231.mjs} +48 -9
- package/build/generateIndex-173ba231.mjs.map +1 -0
- package/build/{generateParameterType-4c9e95a5.mjs → generateParameterType-bb1df689.mjs} +2 -2
- package/build/{generateParameterType-4c9e95a5.mjs.map → generateParameterType-bb1df689.mjs.map} +1 -1
- package/build/{index-cc42a478.mjs → index-3acafba8.mjs} +76 -13
- package/build/index-3acafba8.mjs.map +1 -0
- package/build/{index-06ac2c4c.mjs → index-5985bddb.mjs} +9 -67
- package/build/index-5985bddb.mjs.map +1 -0
- package/build/{postinstall-c38d9b55.mjs → postinstall-3681bf5f.mjs} +3 -3
- package/build/{postinstall-c38d9b55.mjs.map → postinstall-3681bf5f.mjs.map} +1 -1
- package/build/{publishNpm-8ec1b871.mjs → publishNpm-3fb5df2a.mjs} +6 -4
- package/build/{publishNpm-8ec1b871.mjs.map → publishNpm-3fb5df2a.mjs.map} +1 -1
- package/build/scripts-7ed8dff6.mjs +10 -0
- package/build/scripts-7ed8dff6.mjs.map +1 -0
- package/build/{versionFile-aa8b6b7a.mjs → versionFile-e0d6dba2.mjs} +2 -2
- package/build/{versionFile-aa8b6b7a.mjs.map → versionFile-e0d6dba2.mjs.map} +1 -1
- package/lib/lib.mjs +352 -72
- package/package.json +4 -4
- package/readme.md +11 -0
- package/build/cli-381989cc.mjs.map +0 -1
- package/build/generateIndex-074f4aa1.mjs.map +0 -1
- package/build/index-06ac2c4c.mjs.map +0 -1
- package/build/index-cc42a478.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import * as path from 'path';
|
|
|
4
4
|
import * as os from 'os';
|
|
5
5
|
import 'resolve';
|
|
6
6
|
import 'write-pkg';
|
|
7
|
-
import {
|
|
7
|
+
import { a as readPackageCreatorIndex, r as readPackageCreatorManifest, j as getCreatorIndexParameterPrimaryJSType } from './cli-b2b70181.mjs';
|
|
8
8
|
import 'glob';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:fs';
|
|
@@ -72,4 +72,4 @@ const generateParameterType = ({ location , name })=>{
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export { generateParameterType };
|
|
75
|
-
//# sourceMappingURL=generateParameterType-
|
|
75
|
+
//# sourceMappingURL=generateParameterType-bb1df689.mjs.map
|
package/build/{generateParameterType-4c9e95a5.mjs.map → generateParameterType-bb1df689.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateParameterType-
|
|
1
|
+
{"version":3,"file":"generateParameterType-bb1df689.mjs","sources":["../src/commands/generateParameterType.ts"],"sourcesContent":["import ts from \"typescript\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as os from \"os\";\n\nimport {\n\tPackageLocation,\n\tgetCreatorIndexParameterPrimaryJSType,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n} from \"@intelligentgraphics/ig.gfx.tools.core\";\n\nexport interface GenerateParameterTypeOptions {\n\tlocation: PackageLocation;\n\tname: string;\n}\n\nexport const generateParameterType = ({\n\tlocation,\n\tname,\n}: GenerateParameterTypeOptions) => {\n\tconst index = readPackageCreatorIndex(location);\n\tconst manifest = readPackageCreatorManifest(location);\n\n\tif (index === undefined) {\n\t\tthrow new Error(`Could not find the _Index.json file`);\n\t}\n\n\tlet qualifiedName = name;\n\tlet className = name;\n\n\tconst scope = manifest.Scope ?? manifest.Package;\n\n\tif (name.startsWith(scope)) {\n\t\tclassName = name.slice(scope.length + 1);\n\t} else {\n\t\tqualifiedName = `${scope}.${name}`;\n\t}\n\n\tconst informations = index.find((item) => item.Name === qualifiedName);\n\n\tif (informations === undefined) {\n\t\tthrow new Error(`Could not find an index entry for ${name}`);\n\t}\n\n\tconst members: ts.TypeElement[] = [];\n\n\tif (informations.Parameters !== undefined) {\n\t\tconst sortedList = informations.Parameters.slice();\n\t\tsortedList.sort((a, b) => a.DisplayIndex - b.DisplayIndex);\n\n\t\tfor (const parameter of sortedList) {\n\t\t\tconst jsType = getCreatorIndexParameterPrimaryJSType(\n\t\t\t\tparameter.Type,\n\t\t\t);\n\n\t\t\tconst type =\n\t\t\t\tjsType === \"string\"\n\t\t\t\t\t? ts.factory.createTypeReferenceNode(\"string\")\n\t\t\t\t\t: ts.factory.createUnionTypeNode([\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(jsType),\n\t\t\t\t\t\t\tts.factory.createTypeReferenceNode(\"string\"),\n\t\t\t\t\t ]);\n\n\t\t\tlet propertySignature = ts.factory.createPropertySignature(\n\t\t\t\tundefined,\n\t\t\t\tparameter.Name,\n\t\t\t\tparameter.Required\n\t\t\t\t\t? undefined\n\t\t\t\t\t: ts.factory.createToken(ts.SyntaxKind.QuestionToken),\n\t\t\t\ttype,\n\t\t\t);\n\n\t\t\tconst jsdocParts: string[] = [];\n\n\t\t\tif (parameter.Description !== undefined) {\n\t\t\t\tjsdocParts.push(parameter.Description, \"\");\n\t\t\t}\n\n\t\t\tjsdocParts.push(`@creatorType ${parameter.Type}`);\n\n\t\t\tif (jsType === \"string\") {\n\t\t\t\tjsdocParts.push(`@default \"${parameter.Default}\"`);\n\t\t\t} else {\n\t\t\t\tjsdocParts.push(`@default ${parameter.Default}`);\n\t\t\t}\n\n\t\t\tconst jsdocContent = jsdocParts\n\t\t\t\t.map((part) => `* ${part}`)\n\t\t\t\t.join(\"\\n \");\n\t\t\tpropertySignature = ts.addSyntheticLeadingComment(\n\t\t\t\tpropertySignature,\n\t\t\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t\t\t`*\\n ${jsdocContent}\\n `,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tmembers.push(propertySignature);\n\t\t}\n\t}\n\n\tconst interfaceName = `${className}Params`;\n\n\tlet interfaceDeclaration = ts.factory.createInterfaceDeclaration(\n\t\tundefined,\n\t\tinterfaceName,\n\t\tundefined,\n\t\tundefined,\n\t\tmembers,\n\t);\n\n\tinterfaceDeclaration = ts.addSyntheticLeadingComment(\n\t\tinterfaceDeclaration,\n\t\tts.SyntaxKind.MultiLineCommentTrivia,\n\t\t`*\\n * Parameters for the ${className} class\\n `,\n\t\ttrue,\n\t);\n\n\tconst printer = ts.createPrinter();\n\tconst content = printer\n\t\t.printNode(\n\t\t\tts.EmitHint.Unspecified,\n\t\t\tinterfaceDeclaration,\n\t\t\tts.createSourceFile(\"index.ts\", \"\", ts.ScriptTarget.Latest),\n\t\t)\n\t\t.replace(/ /g, \"\\t\");\n\n\tconst outFile = path.join(location.scriptsDir, `${interfaceName}.txt`);\n\n\tfs.writeFileSync(\n\t\toutFile,\n\t\t`Generated parameters interface for ${className}. Insert the interface declaration next to the class and use it as the type for the parameters. Afterwards you can delete this file.` +\n\t\t\tos.EOL +\n\t\t\tos.EOL +\n\t\t\tcontent,\n\t);\n};\n"],"names":["generateParameterType","location","name","index","readPackageCreatorIndex","manifest","readPackageCreatorManifest","undefined","Error","qualifiedName","className","scope","Scope","Package","startsWith","slice","length","informations","find","item","Name","members","Parameters","sortedList","sort","a","b","DisplayIndex","parameter","jsType","getCreatorIndexParameterPrimaryJSType","Type","type","ts","factory","createTypeReferenceNode","createUnionTypeNode","propertySignature","createPropertySignature","Required","createToken","SyntaxKind","QuestionToken","jsdocParts","Description","push","Default","jsdocContent","map","part","join","addSyntheticLeadingComment","MultiLineCommentTrivia","interfaceName","interfaceDeclaration","createInterfaceDeclaration","printer","createPrinter","content","printNode","EmitHint","Unspecified","createSourceFile","ScriptTarget","Latest","replace","outFile","path","scriptsDir","f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OAAS,EAAA,IAAA,CAAA,CAAA;IAEnB,MAAMC,OAAAA,GAAUC,IAAKjB,CAAAA,IAAI,CAACjD,QAAAA,CAASmE,UAAU,EAAE,CAAC,EAAEf,aAAc,CAAA,IAAI,CAAC,CAAA,CAAA;AAErEgB,IAAAA,EAAAA,CAAGC,aAAa,CACfJ,OACA,EAAA,CAAC,mCAAmC,EAAExD,SAAAA,CAAU,oIAAoI,CAAC,GACpL6D,EAAGC,CAAAA,GAAG,GACND,EAAAA,CAAGC,GAAG,GACNd,OAAAA,CAAAA,CAAAA;AAEH;;;;"}
|
|
@@ -3,13 +3,15 @@ import * as fs from 'fs';
|
|
|
3
3
|
import * as terser from 'terser';
|
|
4
4
|
import 'resolve';
|
|
5
5
|
import 'write-pkg';
|
|
6
|
-
import {
|
|
6
|
+
import { r as readPackageCreatorManifest, c as readPackageAnimationList, n as readPackageNpmManifest } from './cli-b2b70181.mjs';
|
|
7
|
+
import { g as getPackageTypescriptFiles } from './scripts-7ed8dff6.mjs';
|
|
7
8
|
import 'node:path';
|
|
8
9
|
import 'node:fs';
|
|
9
|
-
import 'axios';
|
|
10
|
+
import axios from 'axios';
|
|
10
11
|
import ts from 'typescript';
|
|
11
12
|
import typedoc from 'typedoc';
|
|
12
13
|
import glob from 'glob';
|
|
14
|
+
import Ajv from 'ajv';
|
|
13
15
|
|
|
14
16
|
const logPackageMessage = (name, step, index, total)=>{
|
|
15
17
|
const numLength = total === undefined ? undefined : total.toString().length;
|
|
@@ -147,6 +149,19 @@ const toposort = (packages)=>{
|
|
|
147
149
|
return result;
|
|
148
150
|
};
|
|
149
151
|
|
|
152
|
+
let validateAnimationJson;
|
|
153
|
+
const getAnimationJsonValidation = async ()=>{
|
|
154
|
+
if (validateAnimationJson === undefined) {
|
|
155
|
+
validateAnimationJson = await axios.get("https://archive.intelligentgraphics.biz/schemas/gfx/animation.json").then(({ data })=>new Ajv({
|
|
156
|
+
coerceTypes: true,
|
|
157
|
+
allErrors: true,
|
|
158
|
+
removeAdditional: true,
|
|
159
|
+
useDefaults: "empty",
|
|
160
|
+
validateSchema: "log"
|
|
161
|
+
}).compile(data));
|
|
162
|
+
}
|
|
163
|
+
return validateAnimationJson;
|
|
164
|
+
};
|
|
150
165
|
const buildFolders = async (options)=>{
|
|
151
166
|
if (options.outDir !== undefined && options.clean) {
|
|
152
167
|
fs.rmSync(options.outDir, {
|
|
@@ -156,31 +171,71 @@ const buildFolders = async (options)=>{
|
|
|
156
171
|
const workspace = options.workspace;
|
|
157
172
|
const folders = options.packages;
|
|
158
173
|
let sortedPackages = sortPackagesByBuildOrder(folders);
|
|
159
|
-
if (options.skipPackagesWithoutTsFiles) {
|
|
160
|
-
sortedPackages = sortedPackages.filter((location)=>getPackageTypescriptFiles(location).length > 0);
|
|
161
|
-
}
|
|
162
174
|
let index = 1;
|
|
163
175
|
for (const location of sortedPackages){
|
|
176
|
+
const hasTypescript = getPackageTypescriptFiles(location).length > 0;
|
|
164
177
|
ensureTsConfig(location);
|
|
165
178
|
const data = readPackageCreatorManifest(location);
|
|
166
179
|
const logStep = (step)=>logPackageMessage(data.Package, step, index, folders.length);
|
|
167
|
-
logStep("Compiling typescript to javascript");
|
|
168
180
|
const outputDirectory = options.outDir || location.scriptsDir;
|
|
169
181
|
fs.mkdirSync(outputDirectory, {
|
|
170
182
|
recursive: true
|
|
171
183
|
});
|
|
172
|
-
|
|
184
|
+
let buildResult;
|
|
185
|
+
if (hasTypescript) {
|
|
186
|
+
logStep("Compiling typescript to javascript");
|
|
187
|
+
buildResult = await build(location, outputDirectory);
|
|
188
|
+
} else {
|
|
189
|
+
buildResult = {
|
|
190
|
+
js: ""
|
|
191
|
+
};
|
|
192
|
+
}
|
|
173
193
|
const banner = options.banner ? createBannerComment(options.banner) : undefined;
|
|
174
194
|
if (banner) {
|
|
175
195
|
buildResult.js = banner + "\n" + buildResult.js;
|
|
176
|
-
buildResult.definitions
|
|
196
|
+
if (buildResult.definitions !== undefined) {
|
|
197
|
+
buildResult.definitions = banner + "\n" + buildResult.definitions;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const animations = new Map();
|
|
201
|
+
for (const scriptFilePath of readPackageAnimationList(location)){
|
|
202
|
+
const content = fs.readFileSync(scriptFilePath, {
|
|
203
|
+
encoding: "utf8"
|
|
204
|
+
});
|
|
205
|
+
let data;
|
|
206
|
+
try {
|
|
207
|
+
data = JSON.parse(content);
|
|
208
|
+
} catch (err) {
|
|
209
|
+
const relativePath = path.relative(options.workspace.path, scriptFilePath);
|
|
210
|
+
if (err instanceof SyntaxError) {
|
|
211
|
+
throw new Error(`Encountered invalid syntax in file "${relativePath}": ${String(err)}`);
|
|
212
|
+
}
|
|
213
|
+
throw new Error(`Encountered an unexpected error while parsing animation json file at path "${relativePath}"`, {
|
|
214
|
+
cause: err
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
(await getAnimationJsonValidation())(data);
|
|
218
|
+
animations.set(data.Id, JSON.stringify(data));
|
|
219
|
+
}
|
|
220
|
+
if (animations.size > 0) {
|
|
221
|
+
const scope = data.Scope ?? data.Package;
|
|
222
|
+
const scopeParts = scope.split(".");
|
|
223
|
+
buildResult.js += createNamespace(scopeParts);
|
|
224
|
+
for (const [name, content] of animations){
|
|
225
|
+
buildResult.js += `${scope}["${name}"] = ` + content + ";";
|
|
226
|
+
logPackageMessage(data.Package, `Adding animation ${scope}.${name}`);
|
|
227
|
+
}
|
|
228
|
+
} else if (!hasTypescript) {
|
|
229
|
+
throw new Error(`Expected package to have a least one ts file or one animation.json file`);
|
|
177
230
|
}
|
|
178
231
|
fs.writeFileSync(path.join(outputDirectory, `${data.Package}.js`), buildResult.js, {
|
|
179
232
|
encoding: "utf8"
|
|
180
233
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
234
|
+
if (buildResult.definitions !== undefined) {
|
|
235
|
+
fs.writeFileSync(path.join(outputDirectory, `${data.Package}.d.ts`), buildResult.definitions, {
|
|
236
|
+
encoding: "utf8"
|
|
237
|
+
});
|
|
238
|
+
}
|
|
184
239
|
if (options.minimize) {
|
|
185
240
|
const minifyResult = await terser.minify(buildResult.js, {
|
|
186
241
|
ecma: 5
|
|
@@ -190,7 +245,7 @@ const buildFolders = async (options)=>{
|
|
|
190
245
|
encoding: "utf8"
|
|
191
246
|
});
|
|
192
247
|
}
|
|
193
|
-
if (location.path.includes("Basics")) {
|
|
248
|
+
if (location.path.includes("Basics") && buildResult.definitions !== undefined) {
|
|
194
249
|
fs.mkdirSync(path.join(workspace.path, "lib"), {
|
|
195
250
|
recursive: true
|
|
196
251
|
});
|
|
@@ -206,6 +261,14 @@ const buildFolders = async (options)=>{
|
|
|
206
261
|
index++;
|
|
207
262
|
}
|
|
208
263
|
};
|
|
264
|
+
const createNamespace = (parts)=>{
|
|
265
|
+
let code = `var ${parts[0]};`;
|
|
266
|
+
for(let index = 0; index < parts.length; index++){
|
|
267
|
+
const path = parts.slice(0, index + 1).join(".");
|
|
268
|
+
code += `\n(${path} = ${path} || {});`;
|
|
269
|
+
}
|
|
270
|
+
return code;
|
|
271
|
+
};
|
|
209
272
|
const ensureTsConfig = (location)=>{
|
|
210
273
|
const tsconfigPath = path.join(location.scriptsDir, "tsconfig.json");
|
|
211
274
|
if (!fs.existsSync(tsconfigPath)) {
|
|
@@ -309,4 +372,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
309
372
|
});
|
|
310
373
|
|
|
311
374
|
export { buildFolders as b, index as i, logPackageMessage as l };
|
|
312
|
-
//# sourceMappingURL=index-
|
|
375
|
+
//# sourceMappingURL=index-3acafba8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-3acafba8.mjs","sources":["../../tools.core/build/log.mjs","../src/commands/build/tsc.ts","../src/commands/build/docs.ts","../src/lib/toposort.ts","../src/commands/build/index.ts"],"sourcesContent":["const logPackageMessage = (name, step, index, total)=>{\n const numLength = total === undefined ? undefined : total.toString().length;\n const indexString = total === undefined || total < 2 ? \"\" : `${index.toString().padStart(numLength, \"0\")}/${total} `;\n const identifierString = `${indexString}${name.padEnd(15)}`;\n console.log(`${identifierString} >> ${step}`);\n};\n\nexport { logPackageMessage };\n//# sourceMappingURL=log.mjs.map\n","import ts from \"typescript\";\nimport * as path from \"path\";\nimport * as fs from \"fs\";\n\nimport { PackageLocation } from \"../../lib/package\";\n\nimport { FolderBuilder } from \".\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\n\nexport const tryReadTsConfig = (location: PackageLocation) => {\n\tconst { config } = ts.readConfigFile(\n\t\tpath.join(location.scriptsDir, \"tsconfig.json\"),\n\t\t(path) => {\n\t\t\ttry {\n\t\t\t\treturn fs.readFileSync(path, \"utf8\");\n\t\t\t} catch {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t);\n\n\treturn config as {\n\t\tcompilerOptions: ts.CompilerOptions;\n\t};\n};\n\nexport const build: FolderBuilder = async (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => {\n\tconst config = tryReadTsConfig(location);\n\n\tconfig.compilerOptions.lib = [\"es5\", \"dom\"];\n\n\tconst result = ts.convertCompilerOptionsFromJson(\n\t\tconfig.compilerOptions,\n\t\tlocation.scriptsDir,\n\t);\n\n\tconst compilerOptions: ts.CompilerOptions = {\n\t\t...result.options,\n\t\tremoveComments: false,\n\t\tdeclaration: true,\n\t\tsourceMap: false,\n\t\t// We don't use tsc to actually emit the files, but we still need to set the correct\n\t\t// output directory so the compiler can rewrite the `reference path` directives.\n\t\toutFile: path.join(outputDir, \"out.js\"),\n\t\ttarget: ts.ScriptTarget.ES5,\n\t\tnoEmitOnError: true,\n\t};\n\n\tconst host = ts.createCompilerHost(compilerOptions);\n\thost.getCurrentDirectory = () => location.scriptsDir;\n\n\tlet js: string | undefined;\n\tlet definitions: string | undefined;\n\n\thost.writeFile = (fileName, data, writeByteOrderMark) => {\n\t\tif (fileName.endsWith(\".js\")) {\n\t\t\tjs = data;\n\t\t} else if (fileName.endsWith(\".d.ts\")) {\n\t\t\tdefinitions = data;\n\t\t}\n\t};\n\n\tconst files = getPackageTypescriptFiles(location);\n\n\tif (files.length === 0) {\n\t\tthrow new Error(\n\t\t\t`Expected typescript files to exist when building a package. Packages only consisting of animation jsons do not need to be built.`,\n\t\t);\n\t}\n\n\tconst programOptions: ts.CreateProgramOptions = {\n\t\trootNames: files,\n\t\toptions: compilerOptions,\n\t\thost,\n\t};\n\n\tconst program = ts.createProgram(programOptions);\n\tconst emitResult = program.emit();\n\tconst allDiagnostics = ts.getPreEmitDiagnostics(program);\n\n\tif (!emitResult.emitSkipped) {\n\t\tif (allDiagnostics.length > 0) {\n\t\t\tconsole.log(allDiagnostics.map(createErrorMessage).join(\"\\n\"));\n\t\t}\n\n\t\tif (js === undefined || definitions === undefined) {\n\t\t\tthrow new Error(`Unexpected: no js or definitions were created`);\n\t\t}\n\n\t\treturn { js, definitions };\n\t}\n\n\tconst error = allDiagnostics.map(createErrorMessage).join(\"\\n\");\n\n\tthrow new Error(error);\n};\n\nconst createErrorMessage = (diagnostic: ts.Diagnostic) => {\n\tif (!diagnostic.file) {\n\t\treturn `${ts.flattenDiagnosticMessageText(\n\t\t\tdiagnostic.messageText,\n\t\t\t\"\\n\",\n\t\t)}`;\n\t}\n\n\tconst { line, character } = diagnostic.file.getLineAndCharacterOfPosition(\n\t\tdiagnostic.start!,\n\t);\n\n\tconst message = ts.flattenDiagnosticMessageText(\n\t\tdiagnostic.messageText,\n\t\t\"\\n\",\n\t);\n\n\treturn `${diagnostic.file.fileName} (${line + 1},${\n\t\tcharacter + 1\n\t}): ${message}`;\n};\n","import typedoc from \"typedoc\";\nimport glob from \"glob\";\nimport ts from \"typescript\";\nimport * as path from \"path\";\nimport { PackageLocation } from \"../../lib/package\";\n\nexport const generateDocs = async (\n\tlocation: PackageLocation,\n\tdeclarationFile: string,\n\toutFolder: string,\n\tname: string,\n) => {\n\tconst app = new typedoc.Application();\n\n\tconst mediaDir = path.join(location.manifestDir, \"Media\");\n\n\tapp.bootstrap({\n\t\tentryPoints: [declarationFile],\n\t\tmedia: mediaDir,\n\t\tout: outFolder,\n\t\ttsconfig: path.join(location.scriptsDir, \"tsconfig.json\"),\n\t\tskipErrorChecking: true,\n\t});\n\n\tapp.options.setCompilerOptions(\n\t\t[declarationFile],\n\t\t{\n\t\t\ttarget: ts.ScriptTarget.ES5,\n\t\t},\n\t\tundefined,\n\t);\n\n\tapp.options.setValue(\"name\", name);\n\n\tconst [readmePath] = glob.sync(\"**/readme.md\", {\n\t\tabsolute: true,\n\t\tcwd: location.manifestDir,\n\t});\n\n\tif (readmePath) {\n\t\tapp.options.setValue(\"readme\", readmePath);\n\t}\n\n\tconst project = app.convert();\n\n\tif (project) {\n\t\tawait app.generateDocs(project, outFolder);\n\t}\n};\n","// Stolen from ig.tools.core\n\nexport const toposort = (packages: Record<string, string[]>) => {\n\tconst queue = Object.getOwnPropertyNames(packages);\n\tconst result: string[] = [];\n\n\tlet index = 0;\n\n\twhile (queue.length > 0) {\n\t\tif (index >= queue.length) {\n\t\t\tthrow new Error(\"Packages can not have cyclic dependencies\");\n\t\t}\n\n\t\tconst queueEntry = queue[index];\n\n\t\tconst dependencies = packages[queueEntry];\n\t\tconst dependencyQueued = dependencies.some((dependency) =>\n\t\t\tqueue.includes(dependency),\n\t\t);\n\n\t\tif (dependencyQueued) {\n\t\t\tindex++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tqueue.splice(index, 1);\n\t\tindex = 0;\n\t\tresult.push(queueEntry);\n\t}\n\n\treturn result;\n};\n","import * as path from \"path\";\nimport * as fs from \"fs\";\nimport * as terser from \"terser\";\n\nimport { logPackageMessage } from \"../../lib/log\";\nimport { build as tscBuild } from \"./tsc\";\nimport { generateDocs } from \"./docs\";\nimport {\n\tPackageLocation,\n\treadPackageAnimationList,\n\treadPackageCreatorManifest,\n\treadPackageNpmManifest,\n} from \"../../lib/package\";\nimport { WorkspaceLocation } from \"../../lib/workspace\";\nimport { getPackageTypescriptFiles } from \"../../lib/scripts\";\nimport { toposort } from \"../../lib/toposort\";\nimport { PackageJSON } from \"../../lib/packageJSON\";\nimport Ajv, { ValidateFunction } from \"ajv\";\nimport axios from \"axios\";\n\nexport interface BannerOptions {\n\ttext: string | undefined;\n\tversion: string | undefined;\n\tcommit: string | undefined;\n\tcommitDirty: boolean | undefined;\n\tdate: Date | undefined;\n}\n\nexport interface BuildFoldersOptions {\n\tworkspace: WorkspaceLocation;\n\tpackages: PackageLocation[];\n\toutDir?: string;\n\tminimize: boolean;\n\tbanner?: BannerOptions;\n\tclean?: boolean;\n\tdocs?: boolean;\n}\n\nexport interface BuildFolderOptions extends BuildFoldersOptions {\n\toutFile: string;\n}\n\nexport interface FolderBuilderResult {\n\tjs: string;\n\tdefinitions: string;\n}\n\nexport type FolderBuilder = (\n\tlocation: PackageLocation,\n\toutputDir: string,\n) => Promise<FolderBuilderResult>;\n\ntype FolderData = {\n\tlocation: PackageLocation;\n\tdata?: PackageJSON;\n};\n\nlet validateAnimationJson: ValidateFunction | undefined;\n\nconst getAnimationJsonValidation = async () => {\n\tif (validateAnimationJson === undefined) {\n\t\tvalidateAnimationJson = await axios\n\t\t\t.get(\n\t\t\t\t\"https://archive.intelligentgraphics.biz/schemas/gfx/animation.json\",\n\t\t\t)\n\t\t\t.then(({ data }) =>\n\t\t\t\tnew Ajv({\n\t\t\t\t\tcoerceTypes: true,\n\t\t\t\t\tallErrors: true,\n\t\t\t\t\tremoveAdditional: true,\n\t\t\t\t\tuseDefaults: \"empty\",\n\t\t\t\t\tvalidateSchema: \"log\",\n\t\t\t\t}).compile(data),\n\t\t\t);\n\t}\n\n\treturn validateAnimationJson!;\n};\n\nexport const buildFolders = async (options: BuildFoldersOptions) => {\n\tif (options.outDir !== undefined && options.clean) {\n\t\tfs.rmSync(options.outDir, { recursive: true });\n\t}\n\n\tconst workspace = options.workspace;\n\tconst folders = options.packages;\n\n\tlet sortedPackages = sortPackagesByBuildOrder(folders);\n\n\tlet index = 1;\n\n\tfor (const location of sortedPackages) {\n\t\tconst hasTypescript = getPackageTypescriptFiles(location).length > 0;\n\n\t\tensureTsConfig(location);\n\n\t\tconst data = readPackageCreatorManifest(location);\n\n\t\tconst logStep = (step: string) =>\n\t\t\tlogPackageMessage(data.Package, step, index, folders.length);\n\n\t\tconst outputDirectory = options.outDir || location.scriptsDir;\n\t\tfs.mkdirSync(outputDirectory, { recursive: true });\n\n\t\tlet buildResult: {\n\t\t\tjs: string;\n\t\t\tdefinitions?: string;\n\t\t};\n\n\t\tif (hasTypescript) {\n\t\t\tlogStep(\"Compiling typescript to javascript\");\n\t\t\tbuildResult = await tscBuild(location, outputDirectory);\n\t\t} else {\n\t\t\tbuildResult = {\n\t\t\t\tjs: \"\",\n\t\t\t};\n\t\t}\n\n\t\tconst banner = options.banner\n\t\t\t? createBannerComment(options.banner)\n\t\t\t: undefined;\n\n\t\tif (banner) {\n\t\t\tbuildResult.js = banner + \"\\n\" + buildResult.js;\n\t\t\tif (buildResult.definitions !== undefined) {\n\t\t\t\tbuildResult.definitions =\n\t\t\t\t\tbanner + \"\\n\" + buildResult.definitions;\n\t\t\t}\n\t\t}\n\n\t\tconst animations = new Map<string, string>();\n\n\t\tfor (const scriptFilePath of readPackageAnimationList(location)) {\n\t\t\tconst content = fs.readFileSync(scriptFilePath, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t})!;\n\n\t\t\tlet data: { Id: string };\n\n\t\t\ttry {\n\t\t\t\tdata = JSON.parse(content);\n\t\t\t} catch (err) {\n\t\t\t\tconst relativePath = path.relative(\n\t\t\t\t\toptions.workspace.path,\n\t\t\t\t\tscriptFilePath,\n\t\t\t\t);\n\n\t\t\t\tif (err instanceof SyntaxError) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Encountered invalid syntax in file \"${relativePath}\": ${String(\n\t\t\t\t\t\t\terr,\n\t\t\t\t\t\t)}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Encountered an unexpected error while parsing animation json file at path \"${relativePath}\"`,\n\t\t\t\t\t{\n\t\t\t\t\t\tcause: err,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t(await getAnimationJsonValidation())(data);\n\n\t\t\tanimations.set(data.Id, JSON.stringify(data));\n\t\t}\n\n\t\tif (animations.size > 0) {\n\t\t\tconst scope = data.Scope ?? data.Package;\n\t\t\tconst scopeParts = scope.split(\".\");\n\n\t\t\tbuildResult.js += createNamespace(scopeParts);\n\n\t\t\tfor (const [name, content] of animations) {\n\t\t\t\tbuildResult.js += `${scope}[\"${name}\"] = ` + content + \";\";\n\t\t\t\tlogPackageMessage(\n\t\t\t\t\tdata.Package,\n\t\t\t\t\t`Adding animation ${scope}.${name}`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (!hasTypescript) {\n\t\t\tthrow new Error(\n\t\t\t\t`Expected package to have a least one ts file or one animation.json file`,\n\t\t\t);\n\t\t}\n\n\t\tfs.writeFileSync(\n\t\t\tpath.join(outputDirectory, `${data.Package}.js`),\n\t\t\tbuildResult.js,\n\t\t\t{ encoding: \"utf8\" },\n\t\t);\n\t\tif (buildResult.definitions !== undefined) {\n\t\t\tfs.writeFileSync(\n\t\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\t\tbuildResult.definitions,\n\t\t\t\t{ encoding: \"utf8\" },\n\t\t\t);\n\t\t}\n\n\t\tif (options.minimize) {\n\t\t\tconst minifyResult = await terser.minify(buildResult.js, {\n\t\t\t\tecma: 5,\n\t\t\t});\n\n\t\t\tconst minifiedPath = path.join(\n\t\t\t\toutputDirectory,\n\t\t\t\t`${data.Package}.min.js`,\n\t\t\t);\n\t\t\tfs.writeFileSync(minifiedPath, minifyResult.code!, {\n\t\t\t\tencoding: \"utf8\",\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\tlocation.path.includes(\"Basics\") &&\n\t\t\tbuildResult.definitions !== undefined\n\t\t) {\n\t\t\tfs.mkdirSync(path.join(workspace.path, \"lib\"), {\n\t\t\t\trecursive: true,\n\t\t\t});\n\n\t\t\tlogStep(\"Copying basics definition file to the lib folder\");\n\t\t\tfs.writeFileSync(\n\t\t\t\tpath.join(workspace.path, \"lib\", `${data.Package}.d.ts`),\n\t\t\t\tbuildResult.definitions,\n\t\t\t\t{ encoding: \"utf8\" },\n\t\t\t);\n\t\t}\n\n\t\tif (options.docs) {\n\t\t\tlogStep(\"Generating typedoc documentation\");\n\t\t\tawait generateDocs(\n\t\t\t\tlocation,\n\t\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\t\tpath.join(workspace.path, \"docs\", data.Package),\n\t\t\t\tdata.Package,\n\t\t\t);\n\t\t}\n\n\t\tindex++;\n\t}\n};\n\nconst createNamespace = (parts: string[]) => {\n\tlet code = `var ${parts[0]};`;\n\n\tfor (let index = 0; index < parts.length; index++) {\n\t\tconst path = parts.slice(0, index + 1).join(\".\");\n\n\t\tcode += `\\n(${path} = ${path} || {});`;\n\t}\n\n\treturn code;\n};\n\nconst ensureTsConfig = (location: PackageLocation) => {\n\tconst tsconfigPath = path.join(location.scriptsDir, \"tsconfig.json\");\n\n\tif (!fs.existsSync(tsconfigPath)) {\n\t\tconst content = {};\n\t\tapplyTsConfigOption(content);\n\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t} else {\n\t\tconst content = JSON.parse(fs.readFileSync(tsconfigPath, \"utf8\"));\n\t\tapplyTsConfigOption(content);\n\t\tfs.writeFileSync(\n\t\t\ttsconfigPath,\n\t\t\tJSON.stringify(content, undefined, \"\\t\"),\n\t\t\t\"utf8\",\n\t\t);\n\t}\n};\n\nconst applyTsConfigOption = (data: {\n\tcompilerOptions?: { target?: string; lib?: string[] };\n}) => {\n\tdata.compilerOptions = data.compilerOptions ?? {};\n\tdata.compilerOptions.target = \"es5\";\n\tdata.compilerOptions.lib = [\"es5\", \"dom\"];\n};\n\nconst sortPackagesByBuildOrder = (\n\tfolders: PackageLocation[],\n): PackageLocation[] => {\n\tconst packages = Array.from(folders).reduce(\n\t\t(\n\t\t\tacc: Record<string, FolderData>,\n\t\t\tlocation,\n\t\t): Record<string, FolderData> => {\n\t\t\tconst data = readPackageNpmManifest(location);\n\n\t\t\tif (data !== undefined) {\n\t\t\t\tacc[data.name] = {\n\t\t\t\t\tdata,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tacc[location.path] = {\n\t\t\t\t\tdata: undefined,\n\t\t\t\t\tlocation,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst packageDependencies = Object.getOwnPropertyNames(packages).reduce(\n\t\t(acc, packageName) => {\n\t\t\tconst packageData = packages[packageName];\n\n\t\t\tif (packageData.data === undefined) {\n\t\t\t\tacc[packageName] = [];\n\t\t\t} else {\n\t\t\t\tacc[packageName] = Object.getOwnPropertyNames({\n\t\t\t\t\t...packageData.data.devDependencies,\n\t\t\t\t\t...packageData.data.dependencies,\n\t\t\t\t\t...packageData.data.peerDependencies,\n\t\t\t\t}).filter((packageName) => packages[packageName] !== undefined);\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t},\n\t\t{},\n\t);\n\n\tconst sortedPackages = toposort(packageDependencies);\n\tconst result: PackageLocation[] = [];\n\n\tfor (const packageName of sortedPackages) {\n\t\tconst location = packages[packageName].location;\n\n\t\tif (readPackageCreatorManifest(location).Package.endsWith(\".Basics\")) {\n\t\t\tresult.unshift(location);\n\t\t} else {\n\t\t\tresult.push(location);\n\t\t}\n\t}\n\n\treturn result;\n};\n\nconst createBannerComment = (banner: BannerOptions) => {\n\tconst bannerParts: string[] = [];\n\n\tif (banner.text) {\n\t\tbannerParts.push(\" * \" + banner.text);\n\t}\n\n\t{\n\t\tconst details: string[] = [];\n\n\t\tif (banner.version) {\n\t\t\tdetails.push(`Version: ${banner.version}`);\n\t\t}\n\t\tif (banner.commit) {\n\t\t\tif (banner.commitDirty) {\n\t\t\t\tdetails.push(`Commit: ${banner.commit} (dirty)`);\n\t\t\t} else {\n\t\t\t\tdetails.push(`Commit: ${banner.commit}`);\n\t\t\t}\n\t\t}\n\t\tif (banner.date) {\n\t\t\tdetails.push(`Date: ${banner.date.toISOString()}`);\n\t\t}\n\n\t\tconst detailsText = details.map((line) => ` * ${line}`).join(\"\\n\");\n\t\tif (detailsText) {\n\t\t\tbannerParts.push(detailsText);\n\t\t}\n\t}\n\n\tconst bannerText = bannerParts.join(\"\\n\\n\");\n\n\tif (bannerText) {\n\t\treturn `/*\n${bannerText}\n*\n* @preserve\t\t\t\n*/`;\n\t}\n\n\treturn undefined;\n};\n"],"names":["logPackageMessage","name","step","index","total","numLength","undefined","toString","length","indexString","padStart","identifierString","padEnd","console","log","tryReadTsConfig","location","config","ts","readConfigFile","path","join","scriptsDir","fs","readFileSync","build","outputDir","compilerOptions","lib","result","convertCompilerOptionsFromJson","options","removeComments","declaration","sourceMap","outFile","target","ScriptTarget","ES5","noEmitOnError","host","createCompilerHost","getCurrentDirectory","js","definitions","writeFile","fileName","data","writeByteOrderMark","endsWith","files","getPackageTypescriptFiles","Error","programOptions","rootNames","program","createProgram","emitResult","emit","allDiagnostics","getPreEmitDiagnostics","emitSkipped","map","createErrorMessage","error","diagnostic","file","flattenDiagnosticMessageText","messageText","line","character","getLineAndCharacterOfPosition","start","message","generateDocs","declarationFile","outFolder","app","typedoc","Application","mediaDir","manifestDir","bootstrap","entryPoints","media","out","tsconfig","skipErrorChecking","setCompilerOptions","setValue","readmePath","glob","sync","absolute","cwd","project","convert","toposort","packages","queue","Object","getOwnPropertyNames","queueEntry","dependencies","dependencyQueued","some","dependency","includes","splice","push","validateAnimationJson","getAnimationJsonValidation","axios","get","then","Ajv","coerceTypes","allErrors","removeAdditional","useDefaults","validateSchema","compile","buildFolders","outDir","clean","rmSync","recursive","workspace","folders","sortedPackages","sortPackagesByBuildOrder","hasTypescript","ensureTsConfig","readPackageCreatorManifest","logStep","Package","outputDirectory","mkdirSync","buildResult","tscBuild","banner","createBannerComment","animations","Map","scriptFilePath","readPackageAnimationList","content","encoding","JSON","parse","err","relativePath","relative","SyntaxError","String","cause","set","Id","stringify","size","scope","Scope","scopeParts","split","createNamespace","writeFileSync","minimize","minifyResult","terser","minify","ecma","minifiedPath","code","docs","parts","slice","tsconfigPath","existsSync","applyTsConfigOption","Array","from","reduce","acc","readPackageNpmManifest","packageDependencies","packageName","packageData","devDependencies","peerDependencies","filter","unshift","bannerParts","text","details","version","commit","commitDirty","date","toISOString","detailsText","bannerText"],"mappings":";;;;;;;;;;;;;;;AAAA,MAAMA,iBAAoB,GAAA,CAACC,IAAMC,EAAAA,IAAAA,EAAMC,OAAOC,KAAQ,GAAA;AAClD,IAAA,MAAMC,YAAYD,KAAUE,KAAAA,SAAAA,GAAYA,YAAYF,KAAMG,CAAAA,QAAQ,GAAGC,MAAM,CAAA;AAC3E,IAAA,MAAMC,cAAcL,KAAUE,KAAAA,SAAAA,IAAaF,QAAQ,CAAI,GAAA,EAAA,GAAK,CAAC,EAAED,KAAAA,CAAMI,QAAQ,EAAGG,CAAAA,QAAQ,CAACL,SAAW,EAAA,GAAA,CAAA,CAAK,CAAC,EAAED,KAAAA,CAAM,CAAC,CAAC,CAAA;IACpH,MAAMO,gBAAAA,GAAmB,CAAC,EAAEF,WAAAA,CAAY,EAAER,IAAKW,CAAAA,MAAM,CAAC,EAAA,CAAA,CAAI,CAAC,CAAA;IAC3DC,OAAQC,CAAAA,GAAG,CAAC,CAAC,EAAEH,iBAAiB,IAAI,EAAET,KAAK,CAAC,CAAA,CAAA;AAChD;;ACIO,MAAMa,eAAkB,GAAA,CAACC,QAA8B,GAAA;AAC7D,IAAA,MAAM,EAAEC,MAAAA,GAAQ,GAAGC,GAAGC,cAAc,CACnCC,IAAKC,CAAAA,IAAI,CAACL,QAASM,CAAAA,UAAU,EAAE,eAAA,CAAA,EAC/B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,GAAG,CAAC,CAACO,IAAAA,GAAS,CAAC,GAAG,EAAEA,IAAAA,CAAK,CAAC,CAAA,CAAEhD,IAAI,CAAC,IAAA,CAAA,CAAA;AAC7D,QAAA,IAAIkL,WAAa,EAAA;AAChBR,YAAAA,WAAAA,CAAYlF,IAAI,CAAC0F,WAAAA,CAAAA,CAAAA;SACjB;AACF,KAAA;IAEA,MAAMC,UAAAA,GAAaT,WAAY1K,CAAAA,IAAI,CAAC,MAAA,CAAA,CAAA;AAEpC,IAAA,IAAImL,UAAY,EAAA;AACf,QAAA,OAAO,CAAC;AACV,EAAEA,UAAW,CAAA;;;EAGX,CAAC,CAAA;KACD;IAED,OAAOlM,SAAAA,CAAAA;AACR,CAAA;;;;;;;;;"}
|
|
@@ -2,16 +2,15 @@ import * as path from 'path';
|
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import { pipeline } from 'stream/promises';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { r as readPublishedPackageCreatorIndex, d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest, b as readPublishedPackageCreatorManifest } from './dependencies-
|
|
6
|
-
import { P as PACKAGE_FILE, I as INDEX_FILE, p as parseCreatorPackageName, g as getWorkspaceOutputPath, r as readPackageCreatorManifest, w as writePackageCreatorManifest,
|
|
7
|
-
import { l as logPackageMessage, b as buildFolders } from './index-
|
|
5
|
+
import { r as readPublishedPackageCreatorIndex, d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest, b as readPublishedPackageCreatorManifest } from './dependencies-dc3442f0.mjs';
|
|
6
|
+
import { P as PACKAGE_FILE, I as INDEX_FILE, p as parseCreatorPackageName, g as getWorkspaceOutputPath, r as readPackageCreatorManifest, w as writePackageCreatorManifest, i as isErrorENOENT, a as readPackageCreatorIndex, b as readWorkspaceNpmManifest, c as readPackageAnimationList, u as uploadPackage, d as getPackageReleasesDirectory, e as getExistingPackages, s as startSession, f as closeSession } from './cli-b2b70181.mjs';
|
|
7
|
+
import { l as logPackageMessage, b as buildFolders } from './index-3acafba8.mjs';
|
|
8
8
|
import 'write-pkg';
|
|
9
9
|
import 'glob';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import 'node:fs';
|
|
12
|
-
import
|
|
13
|
-
import { g as getVersionFileHandler, p as parseVersionFromString, a as getVersionInformationFromGit, b as getWorkspaceBannerText, c as parseVersionFromNumericVersion, P as PackageVersion } from './versionFile-
|
|
14
|
-
import Ajv from 'ajv';
|
|
12
|
+
import 'axios';
|
|
13
|
+
import { g as getVersionFileHandler, p as parseVersionFromString, a as getVersionInformationFromGit, b as getWorkspaceBannerText, c as parseVersionFromNumericVersion, P as PackageVersion } from './versionFile-e0d6dba2.mjs';
|
|
15
14
|
import JSZip from 'jszip';
|
|
16
15
|
import * as terser from 'terser';
|
|
17
16
|
import 'resolve';
|
|
@@ -23,8 +22,10 @@ import 'events';
|
|
|
23
22
|
import 'core-js/modules/es.typed-array.set.js';
|
|
24
23
|
import 'util';
|
|
25
24
|
import 'inquirer';
|
|
25
|
+
import './scripts-7ed8dff6.mjs';
|
|
26
26
|
import 'typescript';
|
|
27
27
|
import 'typedoc';
|
|
28
|
+
import 'ajv';
|
|
28
29
|
import 'simple-git';
|
|
29
30
|
|
|
30
31
|
const buildArchiveFromPublishedPackage = (location, manifest, creatorPackage)=>{
|
|
@@ -37,7 +38,6 @@ const buildArchiveFromPublishedPackage = (location, manifest, creatorPackage)=>{
|
|
|
37
38
|
archive.file(manifest.main, fs.createReadStream(path.join(location.path, manifest.main)));
|
|
38
39
|
return archive;
|
|
39
40
|
};
|
|
40
|
-
let validateSchema;
|
|
41
41
|
const runtimeScripts = [
|
|
42
42
|
"Interactor",
|
|
43
43
|
"Core",
|
|
@@ -50,15 +50,6 @@ const notRuntimeScripts = [
|
|
|
50
50
|
const buildArchiveFromPackage = async (workspaceLocation, packageLocation, data)=>{
|
|
51
51
|
const { domain , subdomain } = parseCreatorPackageName(data);
|
|
52
52
|
const logStep = (step)=>logPackageMessage(data.Package, step);
|
|
53
|
-
if (validateSchema === undefined) {
|
|
54
|
-
validateSchema = await axios.get("https://archive.intelligentgraphics.biz/schemas/gfx/animation.json").then(({ data })=>new Ajv({
|
|
55
|
-
coerceTypes: true,
|
|
56
|
-
allErrors: true,
|
|
57
|
-
removeAdditional: true,
|
|
58
|
-
useDefaults: "empty",
|
|
59
|
-
validateSchema: "log"
|
|
60
|
-
}).compile(data));
|
|
61
|
-
}
|
|
62
53
|
const libFilePath = path.join(getWorkspaceOutputPath(workspaceLocation), `${data.Package}.min.js`);
|
|
63
54
|
const scriptDirectories = [
|
|
64
55
|
packageLocation.path,
|
|
@@ -84,31 +75,6 @@ const buildArchiveFromPackage = async (workspaceLocation, packageLocation, data)
|
|
|
84
75
|
});
|
|
85
76
|
}
|
|
86
77
|
}
|
|
87
|
-
// if (index === undefined) {
|
|
88
|
-
// throw new Error(
|
|
89
|
-
// `Could not find an "${INDEX_FILE}" file in "${primaryScriptDir}"`,
|
|
90
|
-
// );
|
|
91
|
-
// }
|
|
92
|
-
const animations = new Map();
|
|
93
|
-
for (const scriptFilePath of readPackageAnimationList(packageLocation)){
|
|
94
|
-
const content = fs.readFileSync(scriptFilePath, {
|
|
95
|
-
encoding: "utf8"
|
|
96
|
-
});
|
|
97
|
-
let data;
|
|
98
|
-
try {
|
|
99
|
-
data = JSON.parse(content);
|
|
100
|
-
} catch (err) {
|
|
101
|
-
const relativePath = path.relative(workspaceLocation.path, scriptFilePath);
|
|
102
|
-
if (err instanceof SyntaxError) {
|
|
103
|
-
throw new Error(`Encountered invalid syntax in file "${relativePath}": ${String(err)}`);
|
|
104
|
-
}
|
|
105
|
-
throw new Error(`Encountered an unexpected error while parsing animation json file at path "${relativePath}"`, {
|
|
106
|
-
cause: err
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
validateSchema(data);
|
|
110
|
-
animations.set(data.Id, JSON.stringify(data));
|
|
111
|
-
}
|
|
112
78
|
let libFile;
|
|
113
79
|
try {
|
|
114
80
|
libFile = fs.readFileSync(libFilePath, {
|
|
@@ -119,12 +85,6 @@ const buildArchiveFromPackage = async (workspaceLocation, packageLocation, data)
|
|
|
119
85
|
throw err;
|
|
120
86
|
}
|
|
121
87
|
}
|
|
122
|
-
if (libFile === undefined) {
|
|
123
|
-
if (animations.size === 0) {
|
|
124
|
-
throw new Error(`Could not find a javascript file at "${libFilePath}".
|
|
125
|
-
Packaging without a javascript file is only allowed when animation json files are available`);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
88
|
const archive = new JSZip();
|
|
129
89
|
let library = "";
|
|
130
90
|
if (libFile) {
|
|
@@ -135,15 +95,6 @@ Packaging without a javascript file is only allowed when animation json files ar
|
|
|
135
95
|
library = `/* This file is part of the ${domain} Data Packages.
|
|
136
96
|
* Copyright (C) ${date.getFullYear()} intelligentgraphics. All Rights Reserved. */`;
|
|
137
97
|
}
|
|
138
|
-
if (animations.size > 0) {
|
|
139
|
-
const scope = data.Scope ?? data.Package;
|
|
140
|
-
const scopeParts = scope.split(".");
|
|
141
|
-
library += createNamespace(scopeParts);
|
|
142
|
-
for (const [name, data] of animations){
|
|
143
|
-
library += `${scope}.${name} = ` + data + ";";
|
|
144
|
-
logPackageMessage(manifest.Package, `Added animation ${scope}.${name}`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
98
|
const minifyResult = await terser.minify(library, {
|
|
148
99
|
ecma: 5
|
|
149
100
|
});
|
|
@@ -173,14 +124,6 @@ Packaging without a javascript file is only allowed when animation json files ar
|
|
|
173
124
|
}
|
|
174
125
|
return archive;
|
|
175
126
|
};
|
|
176
|
-
const createNamespace = (parts)=>{
|
|
177
|
-
let code = `var ${parts[0]};`;
|
|
178
|
-
for(let index = 0; index < parts.length; index++){
|
|
179
|
-
const path = parts.slice(0, index + 1).join(".");
|
|
180
|
-
code += `\n(${path} = ${path} || {});`;
|
|
181
|
-
}
|
|
182
|
-
return code;
|
|
183
|
-
};
|
|
184
127
|
|
|
185
128
|
const releaseFolder = async (options)=>{
|
|
186
129
|
const workspace = options.workspace;
|
|
@@ -253,7 +196,6 @@ const releaseFolder = async (options)=>{
|
|
|
253
196
|
packages: [
|
|
254
197
|
location
|
|
255
198
|
],
|
|
256
|
-
skipPackagesWithoutTsFiles: true,
|
|
257
199
|
banner: options.banner ? {
|
|
258
200
|
text: bannerText,
|
|
259
201
|
commit: gitVersionInformation.commit,
|
|
@@ -276,7 +218,7 @@ const releaseFolder = async (options)=>{
|
|
|
276
218
|
var _workspaceManifest_dependencies;
|
|
277
219
|
const workspaceManifest = readWorkspaceNpmManifest(workspace);
|
|
278
220
|
if (!((_workspaceManifest_dependencies = workspaceManifest.dependencies) == null ? void 0 : _workspaceManifest_dependencies["@intelligentgraphics/3d.ig.gfx.standard"])) {
|
|
279
|
-
const install = await options.prompter.confirm(`Animation.json files
|
|
221
|
+
const install = await options.prompter.confirm(`Animation.json files expect the library 'IG.GFX.Standard' to be available, but it is not registered as a dependency. Do you want it to be added now?`);
|
|
280
222
|
if (install) {
|
|
281
223
|
execSync(`npm install @intelligentgraphics/3d.ig.gfx.standard`, {
|
|
282
224
|
encoding: "utf-8",
|
|
@@ -492,4 +434,4 @@ const createSessionManager = async (params)=>{
|
|
|
492
434
|
};
|
|
493
435
|
|
|
494
436
|
export { releaseFolder };
|
|
495
|
-
//# sourceMappingURL=index-
|
|
437
|
+
//# sourceMappingURL=index-5985bddb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-5985bddb.mjs","sources":["../src/commands/publish/zip.ts","../src/commands/publish/index.ts"],"sourcesContent":["import JSZip from \"jszip\";\nimport * as path from \"path\";\nimport * as fs from \"fs\";\nimport * as terser from \"terser\";\n\nimport { isErrorENOENT } from \"../../lib/error\";\nimport { logPackageMessage } from \"../../lib/log\";\nimport {\n\tCreatorPackage,\n\treadPackageCreatorManifest,\n\twritePackageCreatorManifest,\n\treadPackageCreatorIndex,\n\tparseCreatorPackageName,\n\tPackageLocation,\n\tPackageNpmManifest,\n\tINDEX_FILE,\n\tPACKAGE_FILE,\n} from \"../../lib/package\";\nimport { getWorkspaceOutputPath, WorkspaceLocation } from \"../../lib/workspace\";\nimport {\n\tPublishedPackageLocation,\n\treadPublishedPackageCreatorIndex,\n} from \"../../lib/publishedPackage\";\n\nexport const buildArchiveFromPublishedPackage = (\n\tlocation: PublishedPackageLocation,\n\tmanifest: PackageNpmManifest,\n\tcreatorPackage: CreatorPackage,\n) => {\n\tconst archive = new JSZip();\n\n\tarchive.file(PACKAGE_FILE, JSON.stringify(creatorPackage, null, 2));\n\n\tconst index = readPublishedPackageCreatorIndex(location);\n\n\tif (index !== undefined) {\n\t\tarchive.file(INDEX_FILE, JSON.stringify(index, null, 2));\n\t}\n\n\tarchive.file(\n\t\tmanifest.main,\n\t\tfs.createReadStream(path.join(location.path, manifest.main)),\n\t);\n\n\treturn archive;\n};\n\nconst runtimeScripts: CreatorPackage[\"Type\"][] = [\n\t\"Interactor\",\n\t\"Core\",\n\t\"Mixed\",\n];\n\nconst notRuntimeScripts: CreatorPackage[\"Type\"][] = [\"Context\", \"Evaluator\"];\n\nexport const buildArchiveFromPackage = async (\n\tworkspaceLocation: WorkspaceLocation,\n\tpackageLocation: PackageLocation,\n\tdata: CreatorPackage,\n) => {\n\tconst { domain, subdomain } = parseCreatorPackageName(data);\n\n\tconst logStep = (step: string) => logPackageMessage(data.Package, step);\n\n\tconst libFilePath = path.join(\n\t\tgetWorkspaceOutputPath(workspaceLocation),\n\t\t`${data.Package}.min.js`,\n\t);\n\n\tconst scriptDirectories: string[] = [\n\t\tpackageLocation.path,\n\t\tpackageLocation.scriptsDir,\n\t];\n\n\tif (subdomain === \"GFX.Standard\") {\n\t\tlogStep(`Including Images folder`);\n\t\tscriptDirectories.push(path.join(packageLocation.path, \"Images\"));\n\t}\n\n\tconst manifest = readPackageCreatorManifest(packageLocation);\n\n\tif (manifest !== undefined) {\n\t\tif (manifest.RunTime && notRuntimeScripts.includes(manifest.Type)) {\n\t\t\tlogStep(\"Setting script RunTime to false because of script type\");\n\t\t\twritePackageCreatorManifest(packageLocation, {\n\t\t\t\t...manifest,\n\t\t\t\tRunTime: false,\n\t\t\t});\n\t\t} else if (\n\t\t\t!manifest.RunTime &&\n\t\t\truntimeScripts.includes(manifest.Type)\n\t\t) {\n\t\t\tlogStep(\"Setting script RunTime to true because of script type\");\n\t\t\twritePackageCreatorManifest(packageLocation, {\n\t\t\t\t...manifest,\n\t\t\t\tRunTime: true,\n\t\t\t});\n\t\t}\n\t}\n\n\tlet libFile: string | undefined;\n\n\ttry {\n\t\tlibFile = fs.readFileSync(libFilePath, { encoding: \"utf8\" });\n\t} catch (err) {\n\t\tif (!isErrorENOENT(err)) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\tconst archive = new JSZip();\n\n\tlet library: string = \"\";\n\n\tif (libFile) {\n\t\tlibrary = libFile;\n\t}\n\n\tif (!library) {\n\t\tconst date = new Date(Date.now());\n\t\tlibrary = `/* This file is part of the ${domain} Data Packages.\n\t\t* Copyright (C) ${date.getFullYear()} intelligentgraphics. All Rights Reserved. */`;\n\t}\n\n\tconst minifyResult = await terser.minify(library, { ecma: 5 });\n\n\tarchive.file(`${data.Package}.js`, minifyResult.code!);\n\tarchive.file(PACKAGE_FILE, JSON.stringify(data, null, 2));\n\n\tconst creatorIndex = readPackageCreatorIndex(packageLocation);\n\n\tif (creatorIndex !== undefined) {\n\t\tarchive.file(INDEX_FILE, JSON.stringify(creatorIndex, null, 2));\n\t}\n\n\tfor (const directory of scriptDirectories) {\n\t\ttry {\n\t\t\tfor (const file of fs.readdirSync(directory)) {\n\t\t\t\tconst { ext } = path.parse(file);\n\n\t\t\t\tswitch (ext) {\n\t\t\t\t\tcase \".png\":\n\t\t\t\t\tcase \".jpeg\":\n\t\t\t\t\tcase \".jpg\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tarchive.file(\n\t\t\t\t\tfile,\n\t\t\t\t\tfs.createReadStream(path.join(directory, file)),\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(`Script directory \"${directory}\" does not exist`);\n\t\t}\n\t}\n\n\treturn archive;\n};\n","import * as path from \"path\";\nimport * as fs from \"fs\";\nimport { pipeline } from \"stream/promises\";\nimport { execSync } from \"child_process\";\n\nimport {\n\tAssetService,\n\twritePackageCreatorManifest,\n} from \"@intelligentgraphics/ig.gfx.tools.core\";\n\nimport { logPackageMessage } from \"../../lib/log\";\nimport {\n\tCreatorPackage,\n\tgetPackageReleasesDirectory,\n\tPackageLocation,\n\tparseCreatorPackageName,\n\treadPackageAnimationList,\n\treadPackageCreatorManifest,\n} from \"../../lib/package\";\nimport {\n\tgetWorkspaceOutputPath,\n\treadWorkspaceNpmManifest,\n\tWorkspaceLocation,\n} from \"../../lib/workspace\";\nimport { getVersionInformationFromGit } from \"../../lib/git\";\nimport { getWorkspaceBannerText } from \"../../lib/banner\";\nimport {\n\tparseVersionFromNumericVersion,\n\tparseVersionFromString,\n} from \"../../lib/parseVersion\";\nimport { getVersionFileHandler } from \"../../lib/versionFile\";\nimport { isErrorENOENT } from \"../../lib/error\";\nimport { determineWorkspaceIGLibraries } from \"../../lib/dependencies\";\nimport {\n\treadPublishedPackageCreatorManifest,\n\treadPublishedPackageNpmManifest,\n} from \"../../lib/publishedPackage\";\nimport { Prompter, PrompterOption } from \"../../lib/prompter\";\nimport { PackageVersion } from \"../../lib/packageVersion\";\n\nimport { BuildFoldersOptions, buildFolders } from \"../build\";\nimport {\n\tbuildArchiveFromPackage,\n\tbuildArchiveFromPublishedPackage,\n} from \"./zip\";\n\nexport interface ReleaseFolderOptions\n\textends Omit<\n\t\tBuildFoldersOptions,\n\t\t\"skipPackagesWithoutTsFiles\" | \"banner\" | \"packages\"\n\t> {\n\tdirectory: PackageLocation;\n\tnoUpload: boolean;\n\tnewVersion: string;\n\tdomain?: string;\n\tsubdomain?: string;\n\taddress?: string;\n\tservice: string;\n\tauthentication?: AssetService.Authentication;\n\tpushOnly: boolean;\n\tbanner?: boolean;\n\tprompter: Prompter;\n\tskipDependencies?: boolean;\n}\n\nexport const releaseFolder = async (options: ReleaseFolderOptions) => {\n\tconst workspace = options.workspace;\n\tconst location = options.directory;\n\n\tconst { write: writeVersionFile, reset: resetVersionFile } =\n\t\tgetVersionFileHandler(location);\n\n\tconst packageDescription = readPackageCreatorManifest(location);\n\tconst fullPackageName = packageDescription.Package;\n\tconst { domain, subdomain } = parseCreatorPackageName(packageDescription);\n\n\tconst publishDomain = options.domain ?? domain;\n\tconst publishSubdomain = options.subdomain ?? subdomain;\n\n\tconst sharedPackageJson = readWorkspaceNpmManifest(workspace);\n\n\tlet newVersion: PackageVersion;\n\ttry {\n\t\tnewVersion = parseVersionFromString(options.newVersion);\n\t} catch (err) {\n\t\tthrow new Error(`Please enter a version in this format 1.0.0.100`);\n\t}\n\n\tpackageDescription.Version = newVersion.toVersionString({\n\t\tbuildNumber: true,\n\t});\n\twritePackageCreatorManifest(location, packageDescription);\n\n\tif (newVersion.buildNumber < 100) {\n\t\tnewVersion.preRelease = {\n\t\t\ttype: \"beta\",\n\t\t\tversion: newVersion.buildNumber,\n\t\t};\n\t} else if (newVersion.buildNumber > 100) {\n\t\tnewVersion.preRelease = {\n\t\t\ttype: \"patch\",\n\t\t\tversion: newVersion.buildNumber - 100,\n\t\t};\n\t}\n\n\tif (sharedPackageJson !== undefined) {\n\t\tlogPackageMessage(\n\t\t\tpackageDescription.Package,\n\t\t\t`Running npm install to make sure all dependencies are up to date`,\n\t\t);\n\t\texecSync(`npm install`, { encoding: \"utf-8\", cwd: workspace.path });\n\t}\n\n\tconst binDir = getWorkspaceOutputPath(workspace);\n\tfs.mkdirSync(binDir, { recursive: true });\n\n\tlet assetServerPackageDetails: AssetService.UploadPackageDetails;\n\n\tlet packageNameWithVersion: string;\n\n\t{\n\t\tconst versionWithoutPrelease = newVersion.clone();\n\t\tversionWithoutPrelease.preRelease = undefined;\n\t\tconst newVersionString = versionWithoutPrelease.toVersionString({\n\t\t\tbuildNumber: true,\n\t\t});\n\t\tpackageNameWithVersion = `${packageDescription.Package}_${newVersionString}`;\n\n\t\tassetServerPackageDetails = {\n\t\t\tname: packageDescription.Package,\n\t\t\tversion: newVersionString,\n\t\t};\n\t}\n\n\tconst zipFilePath = path.join(binDir, packageNameWithVersion + \".zip\");\n\n\ttry {\n\t\tif (options.pushOnly) {\n\t\t\tif (!fs.existsSync(zipFilePath)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected a zip file to exist at path ${zipFilePath} since pushOnly is specified`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tconst gitVersionInformation = await getVersionInformationFromGit(\n\t\t\t\tworkspace,\n\t\t\t\tlocation,\n\t\t\t);\n\n\t\t\twriteVersionFile(fullPackageName, newVersion);\n\n\t\t\tconst bannerText =\n\t\t\t\tsharedPackageJson !== undefined\n\t\t\t\t\t? getWorkspaceBannerText(sharedPackageJson)\n\t\t\t\t\t: undefined;\n\n\t\t\tawait buildFolders({\n\t\t\t\t...options,\n\t\t\t\tpackages: [location],\n\t\t\t\tbanner: options.banner\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttext: bannerText,\n\t\t\t\t\t\t\tcommit: gitVersionInformation.commit,\n\t\t\t\t\t\t\tcommitDirty: gitVersionInformation.dirty,\n\t\t\t\t\t\t\tversion: newVersion.toVersionString({\n\t\t\t\t\t\t\t\tbuildNumber: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tdate: new Date(Date.now()),\n\t\t\t\t\t\t\t// gitVersionInformation.commitDate\n\t\t\t\t\t\t\t// \t? new Date(gitVersionInformation.commitDate)\n\t\t\t\t\t\t\t// \t: new Date(Date.now()),\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t});\n\n\t\t\tnewVersion.preRelease = undefined;\n\n\t\t\ttry {\n\t\t\t\tfs.rmSync(zipFilePath);\n\t\t\t} catch (err) {\n\t\t\t\tif (!isErrorENOENT(err)) {\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (readPackageAnimationList(location).length > 0) {\n\t\t\t\tconst workspaceManifest = readWorkspaceNpmManifest(workspace);\n\n\t\t\t\tif (\n\t\t\t\t\t!workspaceManifest.dependencies?.[\n\t\t\t\t\t\t\"@intelligentgraphics/3d.ig.gfx.standard\"\n\t\t\t\t\t]\n\t\t\t\t) {\n\t\t\t\t\tconst install = await options.prompter.confirm(\n\t\t\t\t\t\t`Animation.json files expect the library 'IG.GFX.Standard' to be available, but it is not registered as a dependency. Do you want it to be added now?`,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (install) {\n\t\t\t\t\t\texecSync(\n\t\t\t\t\t\t\t`npm install @intelligentgraphics/3d.ig.gfx.standard`,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tencoding: \"utf-8\",\n\t\t\t\t\t\t\t\tcwd: workspace.path,\n\t\t\t\t\t\t\t\tstdio: \"inherit\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\texecSync(`npm run postinstall`, {\n\t\t\t\t\t\t\tcwd: workspace.path,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst archive = await buildArchiveFromPackage(\n\t\t\t\tworkspace,\n\t\t\t\tlocation,\n\t\t\t\tpackageDescription,\n\t\t\t);\n\n\t\t\tconst zipOutputStream = fs.createWriteStream(zipFilePath);\n\t\t\tawait pipeline(archive.generateNodeStream(), zipOutputStream);\n\t\t}\n\n\t\tif (!options.noUpload) {\n\t\t\tif (!options.authentication) {\n\t\t\t\tthrow new Error(`Expected authentication to be available`);\n\t\t\t}\n\n\t\t\tlogPackageMessage(\n\t\t\t\tpackageDescription.Package,\n\t\t\t\t`Opening connection to IG.Asset.Server`,\n\t\t\t);\n\n\t\t\tconst sessionManager = await createSessionManager({\n\t\t\t\turl: options.service,\n\t\t\t\taddress: options.address,\n\t\t\t\tdomain: publishDomain,\n\t\t\t\tsubDomain: publishSubdomain,\n\t\t\t\tauthentication: options.authentication,\n\t\t\t});\n\n\t\t\ttry {\n\t\t\t\tif (!options.skipDependencies) {\n\t\t\t\t\tawait ensureRequiredVersions(\n\t\t\t\t\t\tworkspace,\n\t\t\t\t\t\tpackageDescription,\n\t\t\t\t\t\tsessionManager,\n\t\t\t\t\t\toptions.prompter,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tlogPackageMessage(\n\t\t\t\t\tpackageDescription.Package,\n\t\t\t\t\t`Uploading package to ${publishDomain}.${publishSubdomain}`,\n\t\t\t\t);\n\n\t\t\t\tawait AssetService.uploadPackage(\n\t\t\t\t\tsessionManager.getTargetSession(),\n\t\t\t\t\tassetServerPackageDetails,\n\t\t\t\t\tzipFilePath,\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tawait sessionManager.destroy().catch((err) => {\n\t\t\t\t\tlogPackageMessage(\n\t\t\t\t\t\tpackageDescription.Package,\n\t\t\t\t\t\t`Failed to close IG.Asset.Server session(s): ${err}`,\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\tresetVersionFile();\n\t\tthrow err;\n\t}\n\n\tif (newVersion.buildNumber >= 100 && !options.pushOnly) {\n\t\tlogPackageMessage(fullPackageName, \"Copying zip to releases folder\");\n\n\t\tconst zipFileName = `${packageNameWithVersion}.zip`;\n\t\tconst releasesPath = getPackageReleasesDirectory(location);\n\n\t\tfs.mkdirSync(releasesPath, { recursive: true });\n\t\tfs.copyFileSync(zipFilePath, path.join(releasesPath, zipFileName));\n\t}\n};\n\nconst ensureRequiredVersions = async (\n\tworkspaceLocation: WorkspaceLocation,\n\tcreatorPackage: CreatorPackage,\n\tsessionManager: SessionManager,\n\tprompter: Prompter,\n) => {\n\tinterface UploadedPackage\n\t\textends Omit<AssetService.ExistingPackage, \"version\"> {\n\t\tversion: PackageVersion;\n\t}\n\n\tconst libraries = determineWorkspaceIGLibraries(workspaceLocation);\n\n\t// If there are no libraries, we don't need to check for required versions\n\tif (libraries.length === 0) {\n\t\treturn true;\n\t}\n\n\tconst targetSession = sessionManager.getTargetSession();\n\n\tconst rawUploadedPackages = await AssetService.getExistingPackages(\n\t\ttargetSession,\n\t);\n\n\tconst uploadedPackages = rawUploadedPackages.map(\n\t\t(entry): UploadedPackage => {\n\t\t\tlet version: PackageVersion;\n\n\t\t\ttry {\n\t\t\t\tversion = parseVersionFromNumericVersion(entry.numericVersion);\n\t\t\t} catch (err) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Encountered invalid format for version ${entry.numericVersion}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (version.buildNumber < 100) {\n\t\t\t\tversion.preRelease = {\n\t\t\t\t\ttype: \"beta\",\n\t\t\t\t\tversion: version.buildNumber,\n\t\t\t\t};\n\t\t\t} else if (version.buildNumber > 100) {\n\t\t\t\tversion.preRelease = {\n\t\t\t\t\ttype: \"patch\",\n\t\t\t\t\tversion: version.buildNumber - 100,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...entry,\n\t\t\t\tversion,\n\t\t\t};\n\t\t},\n\t);\n\n\tfor (const libraryLocation of libraries) {\n\t\tconst libraryManifest =\n\t\t\treadPublishedPackageNpmManifest(libraryLocation);\n\t\tconst libraryCreatorPackage =\n\t\t\treadPublishedPackageCreatorManifest(libraryLocation);\n\n\t\tif (\n\t\t\tlibraryCreatorPackage === undefined ||\n\t\t\tlibraryManifest.main === undefined ||\n\t\t\tlibraryCreatorPackage.Package === creatorPackage.Package\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst libraryVersion = PackageVersion.extractFromLine(\n\t\t\tlibraryManifest.version,\n\t\t);\n\n\t\tif (libraryVersion.preRelease) {\n\t\t\tlibraryVersion.buildNumber = libraryVersion.preRelease.version;\n\t\t\tlibraryVersion.preRelease = undefined;\n\t\t} else {\n\t\t\tlibraryVersion.buildNumber = 100;\n\t\t}\n\n\t\tlet uploadedPackageInBasics: UploadedPackage | undefined;\n\t\tlet uploadedPackageInTarget: UploadedPackage | undefined;\n\n\t\tfor (const uploadedPackage of uploadedPackages) {\n\t\t\tif (uploadedPackage.scope === libraryCreatorPackage.Package) {\n\t\t\t\tif (uploadedPackage.support) {\n\t\t\t\t\tuploadedPackageInBasics = uploadedPackage;\n\t\t\t\t} else {\n\t\t\t\t\tuploadedPackageInTarget = uploadedPackage;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst validInBasics =\n\t\t\tuploadedPackageInBasics !== undefined &&\n\t\t\t!uploadedPackageInBasics.version.isLesserThan(libraryVersion);\n\t\tconst validInTarget =\n\t\t\tuploadedPackageInTarget !== undefined &&\n\t\t\t!uploadedPackageInTarget.version.isLesserThan(libraryVersion);\n\n\t\tif (validInBasics || validInTarget) {\n\t\t\tif (\n\t\t\t\ttargetSession.subDomain !== \"Basics\" &&\n\t\t\t\tuploadedPackageInBasics !== undefined &&\n\t\t\t\tuploadedPackageInTarget !== undefined\n\t\t\t) {\n\t\t\t\tlogPackageMessage(\n\t\t\t\t\tcreatorPackage.Package,\n\t\t\t\t\t`Package ${libraryCreatorPackage.Package} is uploaded both for Basics and ${targetSession.subDomain}. The package within ${targetSession.subDomain} will be used.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst possibleTargets: PrompterOption[] = [];\n\n\t\tif (uploadedPackageInBasics) {\n\t\t\tconst version = uploadedPackageInBasics.version.toVersionString({\n\t\t\t\tbuildNumber: true,\n\t\t\t});\n\n\t\t\tpossibleTargets.push({\n\t\t\t\tvalue: \"Basics\",\n\t\t\t\tname: `Basics (Current: ${version})`,\n\t\t\t});\n\t\t} else {\n\t\t\tpossibleTargets.push({\n\t\t\t\tvalue: \"Basics\",\n\t\t\t\tname: \"Basics (Current: None)\",\n\t\t\t});\n\t\t}\n\n\t\tif (targetSession.subDomain !== \"Basics\") {\n\t\t\tif (uploadedPackageInTarget) {\n\t\t\t\tconst version = uploadedPackageInTarget.version.toVersionString(\n\t\t\t\t\t{\n\t\t\t\t\t\tbuildNumber: true,\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tpossibleTargets.push({\n\t\t\t\t\tvalue: targetSession.subDomain,\n\t\t\t\t\tname: `${targetSession.subDomain} (Current: ${version})`,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tpossibleTargets.push({\n\t\t\t\t\tvalue: targetSession.subDomain,\n\t\t\t\t\tname: `${targetSession.subDomain} (Current: None)`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tconst libraryVersionString = libraryVersion.toVersionString({\n\t\t\tbuildNumber: true,\n\t\t});\n\n\t\tconst uploadTargetScope = await prompter.ask({\n\t\t\tmessage: `Version ${libraryVersionString} of dependency ${libraryCreatorPackage.Package} is required but not available. Please select a subdomain to upload the correct dependency version to`,\n\t\t\toptions: [\n\t\t\t\t...possibleTargets,\n\t\t\t\t{ name: \"Skip upload\", value: \"Skip\" },\n\t\t\t],\n\t\t\tdefault: possibleTargets[0].value,\n\t\t});\n\n\t\tif (uploadTargetScope === \"Skip\") {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst archive = buildArchiveFromPublishedPackage(\n\t\t\tlibraryLocation,\n\t\t\tlibraryManifest,\n\t\t\tlibraryCreatorPackage,\n\t\t);\n\n\t\tconst newVersionString = libraryVersion.toVersionString({\n\t\t\tbuildNumber: true,\n\t\t});\n\t\tconst packageNameWithVersion = `${libraryCreatorPackage.Package}_${newVersionString}`;\n\n\t\tconst zipFilePath = path.join(\n\t\t\tgetWorkspaceOutputPath(workspaceLocation),\n\t\t\t`${packageNameWithVersion}.zip`,\n\t\t);\n\n\t\ttry {\n\t\t\tfs.rmSync(zipFilePath);\n\t\t} catch (err) {\n\t\t\tif (!isErrorENOENT(err)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\tconst zipOutputStream = fs.createWriteStream(zipFilePath);\n\t\tawait pipeline(archive.generateNodeStream(), zipOutputStream);\n\n\t\tconst session =\n\t\t\tuploadTargetScope === \"Basics\"\n\t\t\t\t? await sessionManager.getBasicsSession()\n\t\t\t\t: targetSession;\n\n\t\tlogPackageMessage(\n\t\t\tcreatorPackage.Package,\n\t\t\t`Uploading package ${libraryCreatorPackage.Package} with version ${newVersionString} to ${session.domain}.${session.subDomain}`,\n\t\t);\n\n\t\tawait AssetService.uploadPackage(\n\t\t\tsession,\n\t\t\t{\n\t\t\t\tname: libraryCreatorPackage.Package,\n\t\t\t\tversion: newVersionString,\n\t\t\t},\n\t\t\tzipFilePath,\n\t\t);\n\t}\n};\n\ninterface SessionManager {\n\tgetBasicsSession: () => Promise<AssetService.Session>;\n\tgetTargetSession: () => AssetService.Session;\n\tdestroy: () => Promise<void>;\n}\n\nconst createSessionManager = async (\n\tparams: AssetService.SessionStartParams,\n): Promise<SessionManager> => {\n\tconst targetSession = await AssetService.startSession(params);\n\tlet basicsSession: AssetService.Session | undefined;\n\n\treturn {\n\t\tgetBasicsSession: async () => {\n\t\t\tif (targetSession.subDomain === \"Basics\") {\n\t\t\t\treturn targetSession;\n\t\t\t}\n\n\t\t\tif (basicsSession === undefined) {\n\t\t\t\tbasicsSession = await AssetService.startSession({\n\t\t\t\t\t...params,\n\t\t\t\t\tsubDomain: \"Basics\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn basicsSession;\n\t\t},\n\n\t\tgetTargetSession: () => targetSession,\n\n\t\tdestroy: async () => {\n\t\t\tawait AssetService.closeSession(targetSession);\n\n\t\t\tif (basicsSession !== undefined) {\n\t\t\t\tawait AssetService.closeSession(basicsSession);\n\t\t\t}\n\t\t},\n\t};\n};\n"],"names":["buildArchiveFromPublishedPackage","location","manifest","creatorPackage","archive","JSZip","file","PACKAGE_FILE","JSON","stringify","index","readPublishedPackageCreatorIndex","undefined","INDEX_FILE","main","fs","createReadStream","path","join","runtimeScripts","notRuntimeScripts","buildArchiveFromPackage","workspaceLocation","packageLocation","data","domain","subdomain","parseCreatorPackageName","logStep","step","logPackageMessage","Package","libFilePath","getWorkspaceOutputPath","scriptDirectories","scriptsDir","push","readPackageCreatorManifest","RunTime","includes","Type","writePackageCreatorManifest","libFile","readFileSync","encoding","err","isErrorENOENT","library","date","Date","now","getFullYear","minifyResult","terser","minify","ecma","code","creatorIndex","readPackageCreatorIndex","directory","readdirSync","ext","parse","console","error","releaseFolder","options","workspace","write","writeVersionFile","reset","resetVersionFile","getVersionFileHandler","packageDescription","fullPackageName","publishDomain","publishSubdomain","sharedPackageJson","readWorkspaceNpmManifest","newVersion","parseVersionFromString","Error","Version","toVersionString","buildNumber","preRelease","type","version","execSync","cwd","binDir","mkdirSync","recursive","assetServerPackageDetails","packageNameWithVersion","versionWithoutPrelease","clone","newVersionString","name","zipFilePath","pushOnly","existsSync","gitVersionInformation","getVersionInformationFromGit","bannerText","getWorkspaceBannerText","buildFolders","packages","banner","text","commit","commitDirty","dirty","rmSync","readPackageAnimationList","length","workspaceManifest","dependencies","install","prompter","confirm","stdio","zipOutputStream","createWriteStream","pipeline","generateNodeStream","noUpload","authentication","sessionManager","createSessionManager","url","service","address","subDomain","skipDependencies","ensureRequiredVersions","AssetService","getTargetSession","destroy","catch","zipFileName","releasesPath","getPackageReleasesDirectory","copyFileSync","libraries","determineWorkspaceIGLibraries","targetSession","rawUploadedPackages","uploadedPackages","map","entry","parseVersionFromNumericVersion","numericVersion","libraryLocation","libraryManifest","readPublishedPackageNpmManifest","libraryCreatorPackage","readPublishedPackageCreatorManifest","libraryVersion","PackageVersion","extractFromLine","uploadedPackageInBasics","uploadedPackageInTarget","uploadedPackage","scope","support","validInBasics","isLesserThan","validInTarget","possibleTargets","value","libraryVersionString","uploadTargetScope","ask","message","default","session","getBasicsSession","params","basicsSession"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAMA,gCAAAA,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AA,CAAAA;AAEF,KAAA;AACD,CAAA,CAAA;AAQA,MAAM8B,oBAAAA,GAAuB,OAC5BiD,MAC6B,GAAA;AAC7B,IAAA,MAAMhC,aAAgB,GAAA,MAAMV,YAAyB,CAAC0C,MAAAA,CAAAA,CAAAA;IACtD,IAAIC,aAAAA,CAAAA;IAEJ,OAAO;AACNF,QAAAA,gBAAAA,EAAkB,UAAY;YAC7B,IAAI/B,aAAAA,CAAcb,SAAS,KAAK,QAAU,EAAA;gBACzC,OAAOa,aAAAA,CAAAA;aACP;AAED,YAAA,IAAIiC,kBAAkBvK,SAAW,EAAA;gBAChCuK,aAAgB,GAAA,MAAM3C,YAAyB,CAAC;AAC/C,oBAAA,GAAG0C,MAAM;oBACT7C,SAAW,EAAA,QAAA;AACZ,iBAAA,CAAA,CAAA;aACA;YAED,OAAO8C,aAAAA,CAAAA;AACR,SAAA;AAEA1C,QAAAA,gBAAAA,EAAkB,IAAMS,aAAAA;AAExBR,QAAAA,OAAAA,EAAS,UAAY;YACpB,MAAMF,YAAyB,CAACU,aAAAA,CAAAA,CAAAA;AAEhC,YAAA,IAAIiC,kBAAkBvK,SAAW,EAAA;gBAChC,MAAM4H,YAAyB,CAAC2C,aAAAA,CAAAA,CAAAA;aAChC;AACF,SAAA;AACD,KAAA,CAAA;AACD,CAAA;;;;"}
|
|
@@ -2,9 +2,9 @@ import * as path from 'path';
|
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import glob from 'glob';
|
|
4
4
|
import * as os from 'os';
|
|
5
|
-
import { d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest } from './dependencies-
|
|
5
|
+
import { d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest } from './dependencies-dc3442f0.mjs';
|
|
6
6
|
import 'write-pkg';
|
|
7
|
-
import {
|
|
7
|
+
import { b as readWorkspaceNpmManifest, k as getWorkspaceLibPath } from './cli-b2b70181.mjs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'axios';
|
|
@@ -64,4 +64,4 @@ const executePostInstall = (workspace)=>{
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export { executePostInstall };
|
|
67
|
-
//# sourceMappingURL=postinstall-
|
|
67
|
+
//# sourceMappingURL=postinstall-3681bf5f.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall-
|
|
1
|
+
{"version":3,"file":"postinstall-3681bf5f.mjs","sources":["../src/commands/postinstall.ts"],"sourcesContent":["import * as path from \"path\";\nimport * as fs from \"fs\";\nimport glob from \"glob\";\nimport * as os from \"os\";\n\nimport {\n\tgetWorkspaceLibPath,\n\treadWorkspaceNpmManifest,\n\tWorkspaceLocation,\n} from \"../lib/workspace\";\nimport { readPublishedPackageNpmManifest } from \"../lib/publishedPackage\";\nimport { determineWorkspaceIGLibraries } from \"../lib/dependencies\";\n\nconst DEFINITION_FILE_HINT =\n\t\"// This file is automatically managed by the ig.gfx.packager.\";\n\nexport const executePostInstall = (workspace: WorkspaceLocation) => {\n\tconst manifest = readWorkspaceNpmManifest(workspace);\n\n\tconst libPath = getWorkspaceLibPath(workspace);\n\n\tfs.mkdirSync(libPath, { recursive: true });\n\n\tconst existingDefinitions = glob.sync(\"**/*.d.ts\", {\n\t\tcwd: libPath,\n\t\tabsolute: true,\n\t});\n\n\t// delete all existing definition files that are managed by the packager.\n\t// we'll recreate all needed definitions in the next step.\n\tfor (const existingDefinitionPath of existingDefinitions) {\n\t\tconst content = fs.readFileSync(existingDefinitionPath, {\n\t\t\tencoding: \"utf-8\",\n\t\t});\n\n\t\tif (content.startsWith(DEFINITION_FILE_HINT)) {\n\t\t\tfs.rmSync(existingDefinitionPath);\n\t\t}\n\t}\n\n\tconst libraryLocations = determineWorkspaceIGLibraries(workspace);\n\n\tfor (const location of libraryLocations) {\n\t\tconst manifest = readPublishedPackageNpmManifest(location);\n\n\t\tfor (const existingDefinitionPath of existingDefinitions) {\n\t\t\tconst basename = path.basename(existingDefinitionPath);\n\n\t\t\tif (basename === manifest.types) {\n\t\t\t\tfs.rmSync(existingDefinitionPath, { force: true });\n\t\t\t}\n\t\t}\n\n\t\t// add a hint to the top of the file so we know it's managed by the packager.\n\n\t\tconst content = [\n\t\t\tDEFINITION_FILE_HINT,\n\t\t\t`// This is a reference to version ${manifest.version}.`,\n\t\t\t`// Run \"npm install\" to install the types if they are missing or not up to date.`,\n\t\t\t`/// <reference types=\"${manifest.name}\" />`,\n\t\t].join(os.EOL);\n\n\t\tfs.writeFileSync(\n\t\t\tpath.join(getWorkspaceLibPath(workspace), manifest.types),\n\t\t\tcontent,\n\t\t\t{\n\t\t\t\tencoding: \"utf8\",\n\t\t\t},\n\t\t);\n\t}\n};\n"],"names":["DEFINITION_FILE_HINT","executePostInstall","workspace","readWorkspaceNpmManifest","libPath","getWorkspaceLibPath","fs","mkdirSync","recursive","existingDefinitions","glob","sync","cwd","absolute","existingDefinitionPath","content","readFileSync","encoding","startsWith","rmSync","libraryLocations","determineWorkspaceIGLibraries","location","manifest","readPublishedPackageNpmManifest","basename","path","types","force","version","name","join","os","EOL","writeFileSync"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,oBACL,GAAA,+DAAA,CAAA;AAEM,MAAMC,kBAAqB,GAAA,CAACC,SAAiC,GAAA;AACnE,IAAiBC,wBAAyBD,CAAAA,SAAAA,EAAAA;AAE1C,IAAA,MAAME,UAAUC,mBAAoBH,CAAAA,SAAAA,CAAAA,CAAAA;IAEpCI,EAAGC,CAAAA,SAAS,CAACH,OAAS,EAAA;AAAEI,QAAAA,SAAAA,EAAW,IAAI;AAAC,KAAA,CAAA,CAAA;AAExC,IAAA,MAAMC,mBAAsBC,GAAAA,IAAAA,CAAKC,IAAI,CAAC,WAAa,EAAA;QAClDC,GAAKR,EAAAA,OAAAA;AACLS,QAAAA,QAAAA,EAAU,IAAI;AACf,KAAA,CAAA,CAAA;;;IAIA,KAAK,MAAMC,0BAA0BL,mBAAqB,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,KAAA;AACD;;;;"}
|
|
@@ -3,13 +3,13 @@ import * as fs from 'fs';
|
|
|
3
3
|
import { spawnSync } from 'child_process';
|
|
4
4
|
import 'resolve';
|
|
5
5
|
import 'write-pkg';
|
|
6
|
-
import {
|
|
7
|
-
import { b as buildFolders, l as logPackageMessage } from './index-
|
|
6
|
+
import { b as readWorkspaceNpmManifest, g as getWorkspaceOutputPath, r as readPackageCreatorManifest, n as readPackageNpmManifest, o as writePackageNpmManifest, P as PACKAGE_FILE, a as readPackageCreatorIndex, I as INDEX_FILE, q as iterateWorkspacePackages } from './cli-b2b70181.mjs';
|
|
7
|
+
import { b as buildFolders, l as logPackageMessage } from './index-3acafba8.mjs';
|
|
8
8
|
import 'glob';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:fs';
|
|
11
11
|
import 'axios';
|
|
12
|
-
import { p as parseVersionFromString, g as getVersionFileHandler, a as getVersionInformationFromGit, b as getWorkspaceBannerText } from './versionFile-
|
|
12
|
+
import { p as parseVersionFromString, g as getVersionFileHandler, a as getVersionInformationFromGit, b as getWorkspaceBannerText } from './versionFile-e0d6dba2.mjs';
|
|
13
13
|
import 'update-notifier';
|
|
14
14
|
import 'yargs/yargs';
|
|
15
15
|
import 'url';
|
|
@@ -19,8 +19,10 @@ import 'core-js/modules/es.typed-array.set.js';
|
|
|
19
19
|
import 'util';
|
|
20
20
|
import 'inquirer';
|
|
21
21
|
import 'terser';
|
|
22
|
+
import './scripts-7ed8dff6.mjs';
|
|
22
23
|
import 'typescript';
|
|
23
24
|
import 'typedoc';
|
|
25
|
+
import 'ajv';
|
|
24
26
|
import 'simple-git';
|
|
25
27
|
|
|
26
28
|
const publishToNpm = async ({ workspace , location , version: providedVersion , dryRun })=>{
|
|
@@ -131,4 +133,4 @@ const publishToNpm = async ({ workspace , location , version: providedVersion ,
|
|
|
131
133
|
};
|
|
132
134
|
|
|
133
135
|
export { publishToNpm };
|
|
134
|
-
//# sourceMappingURL=publishNpm-
|
|
136
|
+
//# sourceMappingURL=publishNpm-3fb5df2a.mjs.map
|