@intelligentgraphics/ig.gfx.packager 3.0.9 → 3.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/bin.mjs +6 -0
  2. package/build/bin.mjs.map +1 -0
  3. package/build/cli-381989cc.mjs +1389 -0
  4. package/build/cli-381989cc.mjs.map +1 -0
  5. package/build/dependencies-1f665204.mjs +129 -0
  6. package/build/dependencies-1f665204.mjs.map +1 -0
  7. package/build/generateIndex-074f4aa1.mjs +257 -0
  8. package/build/generateIndex-074f4aa1.mjs.map +1 -0
  9. package/build/generateParameterType-4c9e95a5.mjs +75 -0
  10. package/build/generateParameterType-4c9e95a5.mjs.map +1 -0
  11. package/build/index-06ac2c4c.mjs +495 -0
  12. package/build/index-06ac2c4c.mjs.map +1 -0
  13. package/build/index-cc42a478.mjs +312 -0
  14. package/build/index-cc42a478.mjs.map +1 -0
  15. package/build/postinstall-c38d9b55.mjs +67 -0
  16. package/build/postinstall-c38d9b55.mjs.map +1 -0
  17. package/build/publishNpm-8ec1b871.mjs +134 -0
  18. package/build/publishNpm-8ec1b871.mjs.map +1 -0
  19. package/build/versionFile-aa8b6b7a.mjs +384 -0
  20. package/build/versionFile-aa8b6b7a.mjs.map +1 -0
  21. package/lib/lib.mjs +1476 -0
  22. package/package.json +13 -9
  23. package/readme.md +86 -2
  24. package/build/cli-17d957b0.js +0 -2531
  25. package/build/cli-17d957b0.js.map +0 -1
  26. package/build/dependencies-51916db0.js +0 -149
  27. package/build/dependencies-51916db0.js.map +0 -1
  28. package/build/generateIndex-59993f0f.js +0 -266
  29. package/build/generateIndex-59993f0f.js.map +0 -1
  30. package/build/generateParameterType-d3ab08fd.js +0 -74
  31. package/build/generateParameterType-d3ab08fd.js.map +0 -1
  32. package/build/index-a48c5d0a.js +0 -480
  33. package/build/index-a48c5d0a.js.map +0 -1
  34. package/build/index-ac2cd050.js +0 -308
  35. package/build/index-ac2cd050.js.map +0 -1
  36. package/build/index.mjs +0 -6
  37. package/build/index.mjs.map +0 -1
  38. package/build/postinstall-9990fb31.js +0 -64
  39. package/build/postinstall-9990fb31.js.map +0 -1
  40. package/build/publishNpm-74a96626.js +0 -133
  41. package/build/publishNpm-74a96626.js.map +0 -1
  42. package/build/versionFile-68e35b54.js +0 -370
  43. package/build/versionFile-68e35b54.js.map +0 -1
@@ -1,308 +0,0 @@
1
- import * as path from 'path';
2
- import * as fs from 'fs';
3
- import * as terser from 'terser';
4
- import 'resolve';
5
- import 'write-pkg';
6
- import { h as getPackageTypescriptFiles, r as readPackageCreatorManifest, o as readPackageNpmManifest } from './cli-17d957b0.js';
7
- import 'node:path';
8
- import 'node:fs';
9
- import 'axios';
10
- import ts from 'typescript';
11
- import typedoc from 'typedoc';
12
- import glob from 'glob';
13
-
14
- const logPackageMessage = (name, step, index, total) => {
15
- const numLength = total === undefined ? undefined : total.toString().length;
16
- const indexString = total === undefined || total < 2 ? "" : `${index.toString().padStart(numLength, "0")}/${total} `;
17
- const identifierString = `${indexString}${name.padEnd(15)}`;
18
- console.log(`${identifierString} >> ${step}`);
19
- };
20
-
21
- const tryReadTsConfig = location => {
22
- const {
23
- config
24
- } = ts.readConfigFile(path.join(location.scriptsDir, "tsconfig.json"), path => {
25
- try {
26
- return fs.readFileSync(path, "utf8");
27
- } catch {
28
- return undefined;
29
- }
30
- });
31
- return config;
32
- };
33
- const build = async (location, outputDir) => {
34
- const config = tryReadTsConfig(location);
35
- config.compilerOptions.lib = ["es5", "dom"];
36
- const result = ts.convertCompilerOptionsFromJson(config.compilerOptions, location.scriptsDir);
37
- const compilerOptions = {
38
- ...result.options,
39
- removeComments: false,
40
- declaration: true,
41
- sourceMap: false,
42
- // We don't use tsc to actually emit the files, but we still need to set the correct
43
- // output directory so the compiler can rewrite the `reference path` directives.
44
- outFile: path.join(outputDir, "out.js"),
45
- target: ts.ScriptTarget.ES5,
46
- noEmitOnError: true
47
- };
48
- const host = ts.createCompilerHost(compilerOptions);
49
- host.getCurrentDirectory = () => location.scriptsDir;
50
- let js;
51
- let definitions;
52
- host.writeFile = (fileName, data, writeByteOrderMark) => {
53
- if (fileName.endsWith(".js")) {
54
- js = data;
55
- } else if (fileName.endsWith(".d.ts")) {
56
- definitions = data;
57
- }
58
- };
59
- const files = getPackageTypescriptFiles(location);
60
- if (files.length === 0) {
61
- throw new Error(`Expected typescript files to exist when building a package. Packages only consisting of animation jsons do not need to be built.`);
62
- }
63
- const programOptions = {
64
- rootNames: files,
65
- options: compilerOptions,
66
- host
67
- };
68
- const program = ts.createProgram(programOptions);
69
- const emitResult = program.emit();
70
- const allDiagnostics = ts.getPreEmitDiagnostics(program);
71
- if (!emitResult.emitSkipped) {
72
- if (allDiagnostics.length > 0) {
73
- console.log(allDiagnostics.map(createErrorMessage).join("\n"));
74
- }
75
- if (js === undefined || definitions === undefined) {
76
- throw new Error(`Unexpected: no js or definitions were created`);
77
- }
78
- return {
79
- js,
80
- definitions
81
- };
82
- }
83
- const error = allDiagnostics.map(createErrorMessage).join("\n");
84
- throw new Error(error);
85
- };
86
- const createErrorMessage = diagnostic => {
87
- if (!diagnostic.file) {
88
- return `${ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n")}`;
89
- }
90
- const {
91
- line,
92
- character
93
- } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
94
- const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
95
- return `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`;
96
- };
97
-
98
- const generateDocs = async (location, declarationFile, outFolder, name) => {
99
- const app = new typedoc.Application();
100
- const mediaDir = path.join(location.manifestDir, "Media");
101
- app.bootstrap({
102
- entryPoints: [declarationFile],
103
- media: mediaDir,
104
- out: outFolder,
105
- tsconfig: path.join(location.scriptsDir, "tsconfig.json"),
106
- skipErrorChecking: true
107
- });
108
- app.options.setCompilerOptions([declarationFile], {
109
- target: ts.ScriptTarget.ES5
110
- }, undefined);
111
- app.options.setValue("name", name);
112
- const [readmePath] = glob.sync("**/readme.md", {
113
- absolute: true,
114
- cwd: location.manifestDir
115
- });
116
- if (readmePath) {
117
- app.options.setValue("readme", readmePath);
118
- }
119
- const project = app.convert();
120
- if (project) {
121
- await app.generateDocs(project, outFolder);
122
- }
123
- };
124
-
125
- // Stolen from ig.tools.core
126
-
127
- const toposort = packages => {
128
- const queue = Object.getOwnPropertyNames(packages);
129
- const result = [];
130
- let index = 0;
131
- while (queue.length > 0) {
132
- if (index >= queue.length) {
133
- throw new Error("Packages can not have cyclic dependencies");
134
- }
135
- const queueEntry = queue[index];
136
- const dependencies = packages[queueEntry];
137
- const dependencyQueued = dependencies.some(dependency => queue.includes(dependency));
138
- if (dependencyQueued) {
139
- index++;
140
- continue;
141
- }
142
- queue.splice(index, 1);
143
- index = 0;
144
- result.push(queueEntry);
145
- }
146
- return result;
147
- };
148
-
149
- const buildFolders = async options => {
150
- if (options.outDir !== undefined && options.clean) {
151
- fs.rmSync(options.outDir, {
152
- recursive: true
153
- });
154
- }
155
- const workspace = options.workspace;
156
- const folders = options.packages;
157
- const sortedPackages = sortPackagesByBuildOrder(folders);
158
- let index = 1;
159
- for (const location of sortedPackages) {
160
- if (options.skipPackagesWithoutTsFiles && getPackageTypescriptFiles(location).length === 0) {
161
- continue;
162
- }
163
- ensureTsConfig(location);
164
- const data = readPackageCreatorManifest(location);
165
- const logStep = step => logPackageMessage(data.Package, step, index, folders.length);
166
- logStep("Compiling typescript to javascript");
167
- const outputDirectory = options.outDir || location.scriptsDir;
168
- fs.mkdirSync(outputDirectory, {
169
- recursive: true
170
- });
171
- const buildResult = await build(location, outputDirectory);
172
- const banner = options.banner ? createBannerComment(options.banner) : undefined;
173
- if (banner) {
174
- buildResult.js = banner + "\n" + buildResult.js;
175
- buildResult.definitions = banner + "\n" + buildResult.definitions;
176
- }
177
- fs.writeFileSync(path.join(outputDirectory, `${data.Package}.js`), buildResult.js, {
178
- encoding: "utf8"
179
- });
180
- fs.writeFileSync(path.join(outputDirectory, `${data.Package}.d.ts`), buildResult.definitions, {
181
- encoding: "utf8"
182
- });
183
- if (options.minimize) {
184
- const minifyResult = await terser.minify(buildResult.js, {
185
- ecma: 5
186
- });
187
- const minifiedPath = path.join(outputDirectory, `${data.Package}.min.js`);
188
- fs.writeFileSync(minifiedPath, minifyResult.code, {
189
- encoding: "utf8"
190
- });
191
- }
192
- if (location.path.includes("Basics")) {
193
- fs.mkdirSync(path.join(workspace.path, "lib"), {
194
- recursive: true
195
- });
196
- logStep("Copying basics definition file to the lib folder");
197
- fs.writeFileSync(path.join(workspace.path, "lib", `${data.Package}.d.ts`), buildResult.definitions, {
198
- encoding: "utf8"
199
- });
200
- }
201
- if (options.docs) {
202
- logStep("Generating typedoc documentation");
203
- await generateDocs(location, path.join(outputDirectory, `${data.Package}.d.ts`), path.join(workspace.path, "docs", data.Package), data.Package);
204
- }
205
- index++;
206
- }
207
- };
208
- const ensureTsConfig = location => {
209
- const tsconfigPath = path.join(location.scriptsDir, "tsconfig.json");
210
- if (!fs.existsSync(tsconfigPath)) {
211
- const content = {};
212
- applyTsConfigOption(content);
213
- fs.writeFileSync(tsconfigPath, JSON.stringify(content, undefined, "\t"), "utf8");
214
- } else {
215
- const content = JSON.parse(fs.readFileSync(tsconfigPath, "utf8"));
216
- applyTsConfigOption(content);
217
- fs.writeFileSync(tsconfigPath, JSON.stringify(content, undefined, "\t"), "utf8");
218
- }
219
- };
220
- const applyTsConfigOption = data => {
221
- data.compilerOptions = data.compilerOptions ?? {};
222
- data.compilerOptions.target = "es5";
223
- data.compilerOptions.lib = ["es5", "dom"];
224
- };
225
- const sortPackagesByBuildOrder = folders => {
226
- const packages = Array.from(folders).reduce((acc, location) => {
227
- const data = readPackageNpmManifest(location);
228
- if (data !== undefined) {
229
- acc[data.name] = {
230
- data,
231
- location
232
- };
233
- } else {
234
- acc[location.path] = {
235
- data: undefined,
236
- location
237
- };
238
- }
239
- return acc;
240
- }, {});
241
- const packageDependencies = Object.getOwnPropertyNames(packages).reduce((acc, packageName) => {
242
- const packageData = packages[packageName];
243
- if (packageData.data === undefined) {
244
- acc[packageName] = [];
245
- } else {
246
- acc[packageName] = Object.getOwnPropertyNames({
247
- ...packageData.data.devDependencies,
248
- ...packageData.data.dependencies,
249
- ...packageData.data.peerDependencies
250
- }).filter(packageName => packages[packageName] !== undefined);
251
- }
252
- return acc;
253
- }, {});
254
- const sortedPackages = toposort(packageDependencies);
255
- const result = [];
256
- for (const packageName of sortedPackages) {
257
- const location = packages[packageName].location;
258
- if (readPackageCreatorManifest(location).Package.endsWith(".Basics")) {
259
- result.unshift(location);
260
- } else {
261
- result.push(location);
262
- }
263
- }
264
- return result;
265
- };
266
- const createBannerComment = banner => {
267
- const bannerParts = [];
268
- if (banner.text) {
269
- bannerParts.push(" * " + banner.text);
270
- }
271
- {
272
- const details = [];
273
- if (banner.version) {
274
- details.push(`Version: ${banner.version}`);
275
- }
276
- if (banner.commit) {
277
- if (banner.commitDirty) {
278
- details.push(`Commit: ${banner.commit} (dirty)`);
279
- } else {
280
- details.push(`Commit: ${banner.commit}`);
281
- }
282
- }
283
- if (banner.date) {
284
- details.push(`Date: ${banner.date.toISOString()}`);
285
- }
286
- const detailsText = details.map(line => ` * ${line}`).join("\n");
287
- if (detailsText) {
288
- bannerParts.push(detailsText);
289
- }
290
- }
291
- const bannerText = bannerParts.join("\n\n");
292
- if (bannerText) {
293
- return `/*
294
- ${bannerText}
295
- *
296
- * @preserve
297
- */`;
298
- }
299
- return undefined;
300
- };
301
-
302
- var index = /*#__PURE__*/Object.freeze({
303
- __proto__: null,
304
- buildFolders: buildFolders
305
- });
306
-
307
- export { buildFolders as b, index as i, logPackageMessage as l };
308
- //# sourceMappingURL=index-ac2cd050.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-ac2cd050.js","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\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\";\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\tskipPackagesWithoutTsFiles?: 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\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\tconst sortedPackages = sortPackagesByBuildOrder(folders);\n\n\tlet index = 1;\n\n\tfor (const location of sortedPackages) {\n\t\tif (\n\t\t\toptions.skipPackagesWithoutTsFiles &&\n\t\t\tgetPackageTypescriptFiles(location).length === 0\n\t\t) {\n\t\t\tcontinue;\n\t\t}\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\tlogStep(\"Compiling typescript to javascript\");\n\n\t\tconst outputDirectory = options.outDir || location.scriptsDir;\n\t\tfs.mkdirSync(outputDirectory, { recursive: true });\n\n\t\tconst buildResult = await tscBuild(location, outputDirectory);\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\tbuildResult.definitions = banner + \"\\n\" + buildResult.definitions;\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\tfs.writeFileSync(\n\t\t\tpath.join(outputDirectory, `${data.Package}.d.ts`),\n\t\t\tbuildResult.definitions,\n\t\t\t{ encoding: \"utf8\" },\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 (location.path.includes(\"Basics\")) {\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 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","buildFolders","outDir","clean","rmSync","recursive","workspace","folders","sortedPackages","sortPackagesByBuildOrder","skipPackagesWithoutTsFiles","ensureTsConfig","readPackageCreatorManifest","logStep","Package","outputDirectory","mkdirSync","buildResult","tscBuild","banner","createBannerComment","writeFileSync","encoding","minimize","minifyResult","terser","minify","ecma","minifiedPath","code","docs","tsconfigPath","existsSync","content","applyTsConfigOption","JSON","stringify","parse","Array","from","reduce","acc","readPackageNpmManifest","packageDependencies","packageName","packageData","devDependencies","peerDependencies","filter","unshift","bannerParts","text","details","version","commit","commitDirty","date","toISOString","detailsText","bannerText"],"mappings":";;;;;;;;;;;;;AAAaA,MAAAA,iBAAiB,GAAGA,CAChCC,IAAY,EACZC,IAAY,EACZC,KAAc,EACdC,KAAc,KACV;AACJ,EAAA,MAAMC,SAAS,GAAGD,KAAK,KAAKE,SAAS,GAAGA,SAAS,GAAGF,KAAK,CAACG,QAAQ,EAAE,CAACC,MAAM,CAAA;EAE3E,MAAMC,WAAW,GAChBL,KAAK,KAAKE,SAAS,IAAIF,KAAK,GAAG,CAAC,GAC7B,EAAE,GACD,GAAED,KAAK,CAAEI,QAAQ,EAAE,CAACG,QAAQ,CAACL,SAAS,EAAG,GAAG,CAAK,CAAA,CAAA,EAAAD,KAAQ,CAAA,CAAA,CAAA,CAAA;EAE9D,MAAMO,gBAAgB,GAAI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AAC,CAAA;AAE3C,EAAA,IAAImJ,UAAU,EAAE;IACf,OAAQ,CAAA;AACV,EAAEA,UAAW,CAAA;AACb;AACA;AACA,EAAG,CAAA,CAAA;AACF,GAAA;AAEA,EAAA,OAAOlK,SAAS,CAAA;AACjB,CAAC;;;;;;;;;"}
package/build/index.mjs DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import 'source-map-support/register.js';
3
- import 'v8-compile-cache';
4
-
5
- import('./cli-17d957b0.js').then(function (n) { return n.v; });
6
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import \"source-map-support/register.js\";\nimport \"v8-compile-cache\";\n\nimport(\"./cli\");\n"],"names":[],"mappings":";;;;AAGA,OAAO,mBAAO,oCAAC"}
@@ -1,64 +0,0 @@
1
- import * as path from 'path';
2
- import * as fs from 'fs';
3
- import glob from 'glob';
4
- import * as os from 'os';
5
- import { d as determineWorkspaceIGLibraries, a as readPublishedPackageNpmManifest } from './dependencies-51916db0.js';
6
- import 'write-pkg';
7
- import { c as readWorkspaceNpmManifest, l as getWorkspaceLibPath } from './cli-17d957b0.js';
8
- import 'node:path';
9
- import 'node:fs';
10
- import 'axios';
11
- import 'resolve';
12
- import 'update-notifier';
13
- import 'yargs/yargs';
14
- import 'url';
15
- import 'assert';
16
- import 'events';
17
- import 'util';
18
- import 'inquirer';
19
-
20
- const DEFINITION_FILE_HINT = "// This file is automatically managed by the ig.gfx.packager.";
21
- const executePostInstall = workspace => {
22
- readWorkspaceNpmManifest(workspace);
23
- const libPath = getWorkspaceLibPath(workspace);
24
- fs.mkdirSync(libPath, {
25
- recursive: true
26
- });
27
- const existingDefinitions = glob.sync("**/*.d.ts", {
28
- cwd: libPath,
29
- absolute: true
30
- });
31
-
32
- // delete all existing definition files that are managed by the packager.
33
- // we'll recreate all needed definitions in the next step.
34
- for (const existingDefinitionPath of existingDefinitions) {
35
- const content = fs.readFileSync(existingDefinitionPath, {
36
- encoding: "utf-8"
37
- });
38
- if (content.startsWith(DEFINITION_FILE_HINT)) {
39
- fs.rmSync(existingDefinitionPath);
40
- }
41
- }
42
- const libraryLocations = determineWorkspaceIGLibraries(workspace);
43
- for (const location of libraryLocations) {
44
- const manifest = readPublishedPackageNpmManifest(location);
45
- for (const existingDefinitionPath of existingDefinitions) {
46
- const basename = path.basename(existingDefinitionPath);
47
- if (basename === manifest.types) {
48
- fs.rmSync(existingDefinitionPath, {
49
- force: true
50
- });
51
- }
52
- }
53
-
54
- // add a hint to the top of the file so we know it's managed by the packager.
55
-
56
- const content = [DEFINITION_FILE_HINT, `// This is a reference to version ${manifest.version}.`, `// Run "npm install" to install the types if they are missing or not up to date.`, `/// <reference types="${manifest.name}" />`].join(os.EOL);
57
- fs.writeFileSync(path.join(getWorkspaceLibPath(workspace), manifest.types), content, {
58
- encoding: "utf8"
59
- });
60
- }
61
- };
62
-
63
- export { executePostInstall };
64
- //# sourceMappingURL=postinstall-9990fb31.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postinstall-9990fb31.js","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,oBAAoB,GACzB,+DAA+D,CAAA;AAEnDC,MAAAA,kBAAkB,GAAIC,SAA4B,IAAK;AACnE,EAAiBC,wBAAwB,CA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Mb,OAAO,GAAG,CACff,oBAAoB,EACnB,qCAAoCuB,QAAQ,CAACM,OAAQ,CAAA,CAAA,CAAE,EACvD,CAAA,gFAAA,CAAiF,EACjF,CAAwBN,sBAAAA,EAAAA,QAAQ,CAACO,IAAK,CAAK,IAAA,CAAA,CAC5C,CAACC,IAAI,CAACC,EAAE,CAACC,GAAG,CAAC,CAAA;AAEd3B,IAAAA,EAAE,CAAC4B,aAAa,CACfR,IAAI,CAACK,IAAI,CAAC1B,mBAAmB,CAACH,SAAS,CAAC,EAAEqB,QAAQ,CAACI,KAAK,CAAC,EACzDZ,OAAO,EACP;AACCE,MAAAA,QAAQ,EAAE,MAAA;AACX,KAAC,CACD,CAAA;AACF,GAAA;AACD;;;;"}
@@ -1,133 +0,0 @@
1
- import * as path from 'path';
2
- import * as fs from 'fs';
3
- import { spawnSync } from 'child_process';
4
- import 'resolve';
5
- import 'write-pkg';
6
- import { c as readWorkspaceNpmManifest, g as getWorkspaceOutputPath, r as readPackageCreatorManifest, o as readPackageNpmManifest, q as writePackageNpmManifest, P as PACKAGE_FILE, b as readPackageCreatorIndex, I as INDEX_FILE, t as iterateWorkspacePackages } from './cli-17d957b0.js';
7
- import { b as buildFolders, l as logPackageMessage } from './index-ac2cd050.js';
8
- import 'glob';
9
- import 'node:path';
10
- import 'node:fs';
11
- import 'axios';
12
- import { p as parseVersionFromString, g as getVersionFileHandler, a as getVersionInformationFromGit, b as getWorkspaceBannerText } from './versionFile-68e35b54.js';
13
- import 'update-notifier';
14
- import 'yargs/yargs';
15
- import 'url';
16
- import 'assert';
17
- import 'events';
18
- import 'util';
19
- import 'inquirer';
20
- import 'terser';
21
- import 'typescript';
22
- import 'typedoc';
23
- import 'simple-git';
24
-
25
- const publishToNpm = async ({
26
- workspace,
27
- location,
28
- version: providedVersion,
29
- dryRun
30
- }) => {
31
- let newVersion;
32
- try {
33
- newVersion = parseVersionFromString(providedVersion);
34
- } catch (err) {
35
- throw new Error(`Please enter a version in this format 1.0.0.100`);
36
- }
37
- if (newVersion.buildNumber < 100) {
38
- newVersion.preRelease = {
39
- type: "beta",
40
- version: newVersion.buildNumber
41
- };
42
- } else if (newVersion.buildNumber === 100) {
43
- newVersion.preRelease = undefined;
44
- } else {
45
- throw new Error(`Refusing to publish a package with a build version larger than 100.`);
46
- }
47
- const workspaceManifest = readWorkspaceNpmManifest(workspace);
48
- const workspaceOutputPath = getWorkspaceOutputPath(workspace);
49
- const creatorPackage = readPackageCreatorManifest(location);
50
- let packageJson = readPackageNpmManifest(location);
51
- if (packageJson === undefined) {
52
- packageJson = {
53
- name: "@intelligentgraphics/3d" + creatorPackage.Package.toLowerCase(),
54
- version: "1.0.0",
55
- description: creatorPackage.Package
56
- };
57
- }
58
- packageJson.version = newVersion.toVersionString({
59
- buildNumber: false
60
- });
61
- packageJson.description = newVersion.toDescriptionString(creatorPackage.Package);
62
- packageJson.main = `${creatorPackage.Package}.js`;
63
- packageJson.types = `${creatorPackage.Package}.d.ts`;
64
- packageJson.publishConfig ??= {};
65
- packageJson.publishConfig.acccess = "public";
66
- packageJson.ig = {
67
- scriptingLibrary: true
68
- };
69
- packageJson.files = undefined;
70
- const publishDir = path.join(workspaceOutputPath, "publish", creatorPackage.Package);
71
- fs.rmSync(publishDir, {
72
- recursive: true,
73
- force: true
74
- });
75
- fs.mkdirSync(publishDir, {
76
- recursive: true
77
- });
78
- writePackageNpmManifest(location, packageJson);
79
- getVersionFileHandler(location).write(creatorPackage.Package, newVersion);
80
- const gitVersionInformation = await getVersionInformationFromGit(workspace, location);
81
- const bannerText = getWorkspaceBannerText(workspaceManifest);
82
- await buildFolders({
83
- workspace,
84
- packages: [location],
85
- minimize: true,
86
- outDir: getWorkspaceOutputPath(workspace),
87
- banner: {
88
- text: bannerText,
89
- commit: gitVersionInformation.commit,
90
- commitDirty: gitVersionInformation.dirty,
91
- version: newVersion.toVersionString({
92
- buildNumber: true
93
- }),
94
- date: new Date(Date.now())
95
- }
96
- });
97
- fs.copyFileSync(path.join(getWorkspaceOutputPath(workspace), `${creatorPackage.Package}.d.ts`), path.join(publishDir, `${creatorPackage.Package}.d.ts`));
98
- fs.copyFileSync(path.join(getWorkspaceOutputPath(workspace), `${creatorPackage.Package}.min.js`), path.join(publishDir, `${creatorPackage.Package}.js`));
99
- fs.copyFileSync(path.join(location.manifestDir, "package.json"), path.join(publishDir, "package.json"));
100
- fs.writeFileSync(path.join(publishDir, PACKAGE_FILE), JSON.stringify(creatorPackage, null, 2));
101
- const index = readPackageCreatorIndex(location);
102
- if (index !== undefined) {
103
- fs.writeFileSync(path.join(publishDir, INDEX_FILE), JSON.stringify(index));
104
- }
105
- const readmeName = fs.readdirSync(location.path).find(name => name.toLowerCase() === "readme.md");
106
- if (readmeName !== undefined) {
107
- fs.copyFileSync(path.join(location.path, readmeName), path.join(publishDir, readmeName));
108
- }
109
- const npmPublishArgs = [];
110
- if (dryRun) {
111
- npmPublishArgs.push("--dry-run");
112
- }
113
- if (newVersion.preRelease) {
114
- npmPublishArgs.push("--tag", "next");
115
- }
116
- logPackageMessage(creatorPackage.Package, `Publishing to npm with version ${packageJson.version} using tag ${newVersion.preRelease ? "next" : "latest"}`);
117
- spawnSync("npm", ["publish", ...npmPublishArgs], {
118
- stdio: "inherit",
119
- encoding: "utf8",
120
- cwd: publishDir
121
- });
122
- for (const packageLocation of iterateWorkspacePackages(workspace)) {
123
- var _manifest$dependencie;
124
- const manifest = readPackageNpmManifest(packageLocation);
125
- if ((manifest === null || manifest === void 0 ? void 0 : (_manifest$dependencie = manifest.dependencies) === null || _manifest$dependencie === void 0 ? void 0 : _manifest$dependencie[packageJson.name]) !== undefined) {
126
- manifest.dependencies[packageJson.name] = "^" + packageJson.version;
127
- writePackageNpmManifest(packageLocation, manifest);
128
- }
129
- }
130
- };
131
-
132
- export { publishToNpm };
133
- //# sourceMappingURL=publishNpm-74a96626.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publishNpm-74a96626.js","sources":["../src/commands/publishNpm.ts"],"sourcesContent":["import * as path from \"path\";\nimport * as fs from \"fs\";\nimport { spawnSync } from \"child_process\";\n\nimport { PackageVersion } from \"../lib/packageVersion\";\nimport {\n\tINDEX_FILE,\n\tPackageLocation,\n\tPACKAGE_FILE,\n\treadPackageCreatorIndex,\n\treadPackageCreatorManifest,\n\treadPackageNpmManifest,\n\twritePackageNpmManifest,\n} from \"../lib/package\";\nimport {\n\tgetWorkspaceOutputPath,\n\titerateWorkspacePackages,\n\treadWorkspaceNpmManifest,\n\tWorkspaceLocation,\n} from \"../lib/workspace\";\nimport { getVersionInformationFromGit } from \"../lib/git\";\nimport { getWorkspaceBannerText } from \"../lib/banner\";\nimport { parseVersionFromString } from \"../lib/parseVersion\";\nimport { getVersionFileHandler } from \"../lib/versionFile\";\nimport { logPackageMessage } from \"../lib/log\";\n\nimport { buildFolders } from \"./build\";\n\nexport interface PublishToNpmSettings {\n\tworkspace: WorkspaceLocation;\n\tlocation: PackageLocation;\n\tversion: string;\n\tdryRun?: boolean;\n}\n\nexport const publishToNpm = async ({\n\tworkspace,\n\tlocation,\n\tversion: providedVersion,\n\tdryRun,\n}: PublishToNpmSettings) => {\n\tlet newVersion: PackageVersion;\n\ttry {\n\t\tnewVersion = parseVersionFromString(providedVersion);\n\t} catch (err) {\n\t\tthrow new Error(`Please enter a version in this format 1.0.0.100`);\n\t}\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 = undefined;\n\t} else {\n\t\tthrow new Error(\n\t\t\t`Refusing to publish a package with a build version larger than 100.`,\n\t\t);\n\t}\n\n\tconst workspaceManifest = readWorkspaceNpmManifest(workspace);\n\tconst workspaceOutputPath = getWorkspaceOutputPath(workspace);\n\tconst creatorPackage = readPackageCreatorManifest(location);\n\tlet packageJson = readPackageNpmManifest(location);\n\n\tif (packageJson === undefined) {\n\t\tpackageJson = {\n\t\t\tname:\n\t\t\t\t\"@intelligentgraphics/3d\" +\n\t\t\t\tcreatorPackage.Package.toLowerCase(),\n\t\t\tversion: \"1.0.0\",\n\t\t\tdescription: creatorPackage.Package,\n\t\t};\n\t}\n\n\tpackageJson.version = newVersion.toVersionString({\n\t\tbuildNumber: false,\n\t});\n\tpackageJson.description = newVersion.toDescriptionString(\n\t\tcreatorPackage.Package,\n\t);\n\tpackageJson.main = `${creatorPackage.Package}.js`;\n\tpackageJson.types = `${creatorPackage.Package}.d.ts`;\n\tpackageJson.publishConfig ??= {};\n\tpackageJson.publishConfig.acccess = \"public\";\n\tpackageJson.ig = {\n\t\tscriptingLibrary: true,\n\t};\n\tpackageJson.files = undefined;\n\n\tconst publishDir = path.join(\n\t\tworkspaceOutputPath,\n\t\t\"publish\",\n\t\tcreatorPackage.Package,\n\t);\n\tfs.rmSync(publishDir, { recursive: true, force: true });\n\tfs.mkdirSync(publishDir, { recursive: true });\n\n\twritePackageNpmManifest(location, packageJson);\n\n\tgetVersionFileHandler(location).write(creatorPackage.Package, newVersion);\n\n\tconst gitVersionInformation = await getVersionInformationFromGit(\n\t\tworkspace,\n\t\tlocation,\n\t);\n\n\tconst bannerText = getWorkspaceBannerText(workspaceManifest);\n\n\tawait buildFolders({\n\t\tworkspace,\n\t\tpackages: [location],\n\t\tminimize: true,\n\t\toutDir: getWorkspaceOutputPath(workspace),\n\t\tbanner: {\n\t\t\ttext: bannerText,\n\t\t\tcommit: gitVersionInformation.commit,\n\t\t\tcommitDirty: gitVersionInformation.dirty,\n\t\t\tversion: newVersion.toVersionString({\n\t\t\t\tbuildNumber: true,\n\t\t\t}),\n\t\t\tdate: new Date(Date.now()),\n\t\t},\n\t});\n\n\tfs.copyFileSync(\n\t\tpath.join(\n\t\t\tgetWorkspaceOutputPath(workspace),\n\t\t\t`${creatorPackage.Package}.d.ts`,\n\t\t),\n\t\tpath.join(publishDir, `${creatorPackage.Package}.d.ts`),\n\t);\n\tfs.copyFileSync(\n\t\tpath.join(\n\t\t\tgetWorkspaceOutputPath(workspace),\n\t\t\t`${creatorPackage.Package}.min.js`,\n\t\t),\n\t\tpath.join(publishDir, `${creatorPackage.Package}.js`),\n\t);\n\n\tfs.copyFileSync(\n\t\tpath.join(location.manifestDir, \"package.json\"),\n\t\tpath.join(publishDir, \"package.json\"),\n\t);\n\n\tfs.writeFileSync(\n\t\tpath.join(publishDir, PACKAGE_FILE),\n\t\tJSON.stringify(creatorPackage, null, 2),\n\t);\n\n\tconst index = readPackageCreatorIndex(location);\n\n\tif (index !== undefined) {\n\t\tfs.writeFileSync(\n\t\t\tpath.join(publishDir, INDEX_FILE),\n\t\t\tJSON.stringify(index),\n\t\t);\n\t}\n\n\tconst readmeName = fs\n\t\t.readdirSync(location.path)\n\t\t.find((name) => name.toLowerCase() === \"readme.md\");\n\n\tif (readmeName !== undefined) {\n\t\tfs.copyFileSync(\n\t\t\tpath.join(location.path, readmeName),\n\t\t\tpath.join(publishDir, readmeName),\n\t\t);\n\t}\n\n\tconst npmPublishArgs: string[] = [];\n\n\tif (dryRun) {\n\t\tnpmPublishArgs.push(\"--dry-run\");\n\t}\n\n\tif (newVersion.preRelease) {\n\t\tnpmPublishArgs.push(\"--tag\", \"next\");\n\t}\n\n\tlogPackageMessage(\n\t\tcreatorPackage.Package,\n\t\t`Publishing to npm with version ${packageJson.version} using tag ${\n\t\t\tnewVersion.preRelease ? \"next\" : \"latest\"\n\t\t}`,\n\t);\n\n\tspawnSync(\"npm\", [\"publish\", ...npmPublishArgs], {\n\t\tstdio: \"inherit\",\n\t\tencoding: \"utf8\",\n\t\tcwd: publishDir,\n\t});\n\n\tfor (const packageLocation of iterateWorkspacePackages(workspace)) {\n\t\tconst manifest = readPackageNpmManifest(packageLocation);\n\n\t\tif (manifest?.dependencies?.[packageJson.name] !== undefined) {\n\t\t\tmanifest.dependencies[packageJson.name] = \"^\" + packageJson.version;\n\t\t\twritePackageNpmManifest(packageLocation, manifest);\n\t\t}\n\t}\n};\n"],"names":["publishToNpm","workspace","location","version","providedVersion","dryRun","newVersion","parseVersionFromString","err","Error","buildNumber","preRelease","type","undefined","workspaceManifest","readWorkspaceNpmManifest","workspaceOutputPath","getWorkspaceOutputPath","creatorPackage","readPackageCreatorManifest","packageJson","readPackageNpmManifest","name","Package","toLowerCase","description","toVersionString","toDescriptionString","main","types","publishConfig","acccess","ig","scriptingLibrary","files","publishDir","path","join","fs","rmSync","recursive","force","mkdirSync","writePackageNpmManifest","getVersionFileHandler","write","gitVersionInformation","getVersionInformationFromGit","bannerText","getWorkspaceBannerText","buildFolders","packages","minimize","outDir","banner","text","commit","commitDirty","dirty","date","Date","now","copyFileSync","manifestDir","writeFileSync","PACKAGE_FILE","JSON","stringify","index","readPackageCreatorIndex","INDEX_FILE","readmeName","readdirSync","find","npmPublishArgs","push","logPackageMessage","spawnSync","stdio","encoding","cwd","packageLocation","iterateWorkspacePackages","_manifest$dependencie","manifest","dependencies"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmCaA,MAAAA,YAAY,GAAG,OAAO;EAClCC,SAAS;EACTC,QAAQ;AACRC,EAAAA,OAAO,EAAEC,eAAe;AACxBC,EAAAA,MAAAA;AACqB,CAAC,KAAK;AAC3B,EAAA,IAAIC,UAA0B,CAAA;EAC9B,IAAI;AACHA,IAAAA,UAAU,GAAGC,sBAAsB,CAACH,eAAe,CAAC,CAAA;GACpD,CAAC,OAAOI,GAAG,EAAE;AACb,IAAA,MAAM,IAAIC,KAAK,CAAE,CAAA,+CAAA,CAAgD,CAAC,CAAA;AACnE,GAAA;AAEA,EAAA,IAAIH,UAAU,CAACI,WAAW,GAAG,GAAG,EAAE;IACjCJ,UAAU,CAACK,UAAU,GAAG;AACvBC,MAAAA,IAAI,EAAE,MAAM;MACZT,OAAO,EAAEG,UAAU,CAACI,WAAAA;KACpB,CAAA;AACF,GAAC,MAAM,IAAIJ,UAAU,CAACI,WAAW,KAAK,GAAG,EAAE;IAC1CJ,UAAU,CAACK,UAAU,G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