@uns-kit/cli 3.0.6 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import readline from "node:readline/promises";
|
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
11
|
import * as azdev from "azure-devops-node-api";
|
|
12
12
|
import { generateAgentsMarkdown, generateServiceSpecMarkdown, getServiceBundleOutputPublisherContracts, readAndValidateServiceBundle, } from "./service-bundle.js";
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const currentFilename = fileURLToPath(import.meta.url);
|
|
14
|
+
const currentDirname = path.dirname(currentFilename);
|
|
15
15
|
const require = createRequire(import.meta.url);
|
|
16
16
|
const cliVersion = resolveCliVersion();
|
|
17
17
|
const coreVersion = resolveCoreVersion();
|
|
@@ -261,7 +261,7 @@ async function createProjectFromBundle(options) {
|
|
|
261
261
|
}
|
|
262
262
|
async function scaffoldTsProject(projectName, targetDir, options = {}) {
|
|
263
263
|
await ensureTargetDir(targetDir, { allowExisting: options.allowExisting });
|
|
264
|
-
const templateDir = path.resolve(
|
|
264
|
+
const templateDir = path.resolve(currentDirname, `../templates/${options.templateName ?? DEFAULT_TEMPLATE_NAME}`);
|
|
265
265
|
try {
|
|
266
266
|
await access(templateDir);
|
|
267
267
|
}
|
|
@@ -529,6 +529,7 @@ const AGENT_MIGRATION_BLOCK = [
|
|
|
529
529
|
"- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.",
|
|
530
530
|
"- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.",
|
|
531
531
|
"- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.",
|
|
532
|
+
"- When crossing `<3.0.7` to `>=3.0.7`, update the application's direct `zod` dependency to Zod 4, migrate Zod-3-only project config extension APIs, and regenerate `config.schema.json` plus `src/config/app-config.ts`.",
|
|
532
533
|
AGENT_MIGRATION_END,
|
|
533
534
|
].join("\n");
|
|
534
535
|
async function ensureAgentMigrationGuidance(targetDir) {
|
|
@@ -694,7 +695,7 @@ async function applyAzureDevopsConfig(targetDir, options) {
|
|
|
694
695
|
scripts["pull-request"] = "node ./node_modules/@uns-kit/core/dist/tools/pull-request.js";
|
|
695
696
|
pkgChanged = true;
|
|
696
697
|
}
|
|
697
|
-
const azurePipelineTemplatePath = path.resolve(
|
|
698
|
+
const azurePipelineTemplatePath = path.resolve(currentDirname, "../templates/azure-pipelines.yml");
|
|
698
699
|
try {
|
|
699
700
|
await access(azurePipelineTemplatePath);
|
|
700
701
|
}
|
|
@@ -753,7 +754,7 @@ function logDevopsResult(result, options) {
|
|
|
753
754
|
}
|
|
754
755
|
async function configureVscode(targetPath, options = {}) {
|
|
755
756
|
const targetDir = path.resolve(process.cwd(), targetPath ?? ".");
|
|
756
|
-
const templateDir = path.resolve(
|
|
757
|
+
const templateDir = path.resolve(currentDirname, "../templates/vscode");
|
|
757
758
|
try {
|
|
758
759
|
await access(templateDir);
|
|
759
760
|
}
|
|
@@ -786,7 +787,7 @@ async function configureVscode(targetPath, options = {}) {
|
|
|
786
787
|
}
|
|
787
788
|
async function configureConfigFiles(targetPath, options = {}) {
|
|
788
789
|
const targetDir = path.resolve(process.cwd(), targetPath ?? ".");
|
|
789
|
-
const templateDir = path.resolve(
|
|
790
|
+
const templateDir = path.resolve(currentDirname, "../templates/config-files");
|
|
790
791
|
try {
|
|
791
792
|
await access(templateDir);
|
|
792
793
|
}
|
|
@@ -839,7 +840,7 @@ async function applyConfigTemplatePlaceholders(targetDir, relativePaths) {
|
|
|
839
840
|
}
|
|
840
841
|
async function configureCodegen(targetPath, options = {}) {
|
|
841
842
|
const targetDir = path.resolve(process.cwd(), targetPath ?? ".");
|
|
842
|
-
const templateDir = path.resolve(
|
|
843
|
+
const templateDir = path.resolve(currentDirname, "../templates/codegen");
|
|
843
844
|
const packagePath = path.join(targetDir, "package.json");
|
|
844
845
|
try {
|
|
845
846
|
await access(templateDir);
|
|
@@ -1136,7 +1137,7 @@ function parseConfigureTemplatesArgs(args, availableTemplates) {
|
|
|
1136
1137
|
return { targetPath, overwrite, includeAll, templateNames };
|
|
1137
1138
|
}
|
|
1138
1139
|
async function runConfigureTemplatesCommand(args) {
|
|
1139
|
-
const templateRoot = path.resolve(
|
|
1140
|
+
const templateRoot = path.resolve(currentDirname, "../templates");
|
|
1140
1141
|
const availableTemplates = await listTemplateDirectories(templateRoot, { includeDefault: true });
|
|
1141
1142
|
const allTemplates = await listTemplateDirectories(templateRoot, { includeDefault: false });
|
|
1142
1143
|
const { targetPath, overwrite, includeAll, templateNames } = parseConfigureTemplatesArgs(args, availableTemplates);
|
|
@@ -1384,7 +1385,7 @@ function normalizeTemplateFilename(filename) {
|
|
|
1384
1385
|
async function configurePlugin(options) {
|
|
1385
1386
|
const { targetPath, templateName, dependencyName, dependencySpecifier, label, overwrite } = options;
|
|
1386
1387
|
const targetDir = path.resolve(process.cwd(), targetPath ?? ".");
|
|
1387
|
-
const templateDir = path.resolve(
|
|
1388
|
+
const templateDir = path.resolve(currentDirname, `../templates/${templateName}`);
|
|
1388
1389
|
const packagePath = path.join(targetDir, "package.json");
|
|
1389
1390
|
try {
|
|
1390
1391
|
await access(templateDir);
|
|
@@ -1852,7 +1853,7 @@ function normalizePackageName(input) {
|
|
|
1852
1853
|
|| "uns-app";
|
|
1853
1854
|
}
|
|
1854
1855
|
function resolveUnsPackageSpecifier(packageName, relativeLocalPath) {
|
|
1855
|
-
const localPath = path.resolve(
|
|
1856
|
+
const localPath = path.resolve(currentDirname, relativeLocalPath);
|
|
1856
1857
|
if (existsSync(localPath)) {
|
|
1857
1858
|
const pkg = require(localPath);
|
|
1858
1859
|
const version = pkg?.version ?? "0.0.1";
|
|
@@ -1878,7 +1879,7 @@ function resolveUnsPackageVersion(packageName, relativeLocalPath) {
|
|
|
1878
1879
|
return directVersion;
|
|
1879
1880
|
}
|
|
1880
1881
|
const workspaceVersion = attempt(() => {
|
|
1881
|
-
const pkgPath = path.resolve(
|
|
1882
|
+
const pkgPath = path.resolve(currentDirname, relativeLocalPath);
|
|
1882
1883
|
const pkg = require(pkgPath);
|
|
1883
1884
|
return pkg?.version;
|
|
1884
1885
|
});
|
|
@@ -1944,7 +1945,7 @@ function resolveCoreVersion() {
|
|
|
1944
1945
|
return directVersion;
|
|
1945
1946
|
}
|
|
1946
1947
|
const workspaceVersion = attempt(() => {
|
|
1947
|
-
const localPath = path.resolve(
|
|
1948
|
+
const localPath = path.resolve(currentDirname, "../../uns-core/package.json");
|
|
1948
1949
|
const pkg = require(localPath);
|
|
1949
1950
|
return pkg?.version;
|
|
1950
1951
|
});
|
package/dist/service-bundle.js
CHANGED
|
@@ -82,6 +82,7 @@ export function generateAgentsMarkdown(bundle) {
|
|
|
82
82
|
"- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.",
|
|
83
83
|
"- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.",
|
|
84
84
|
"- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.",
|
|
85
|
+
"- When crossing `<3.0.7` to `>=3.0.7`, update the application's direct `zod` dependency to Zod 4, migrate Zod-3-only project config extension APIs, and regenerate `config.schema.json` plus `src/config/app-config.ts`.",
|
|
85
86
|
"<!-- uns-kit:migrations:end -->",
|
|
86
87
|
"",
|
|
87
88
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uns-kit/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Command line scaffolding tool for UNS applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"azure-devops-node-api": "^15.1.2",
|
|
29
|
-
"@uns-kit/core": "3.0.
|
|
29
|
+
"@uns-kit/core": "3.0.9"
|
|
30
30
|
},
|
|
31
31
|
"unsKitPackages": {
|
|
32
|
-
"@uns-kit/core": "3.0.
|
|
33
|
-
"@uns-kit/api": "3.0.
|
|
34
|
-
"@uns-kit/cron": "3.0.
|
|
35
|
-
"@uns-kit/database": "3.0.
|
|
36
|
-
"@uns-kit/assistant-workflow": "3.0.
|
|
32
|
+
"@uns-kit/core": "3.0.9",
|
|
33
|
+
"@uns-kit/api": "3.0.9",
|
|
34
|
+
"@uns-kit/cron": "3.0.9",
|
|
35
|
+
"@uns-kit/database": "3.0.9",
|
|
36
|
+
"@uns-kit/assistant-workflow": "3.0.9"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -p tsconfig.build.json",
|
package/templates/cron/AGENTS.md
CHANGED
|
@@ -21,10 +21,13 @@ Pointers for AI/code-assist tools when working in this generated project.
|
|
|
21
21
|
- `pnpm run sync-uns-metadata -- --controller-url ... --token ...` -> pulls topics/tags/assets from the controller and regenerates local TS helpers
|
|
22
22
|
|
|
23
23
|
<!-- uns-kit:migrations:start -->
|
|
24
|
+
|
|
24
25
|
## UNS Kit dependency upgrades
|
|
25
26
|
|
|
26
27
|
- Before changing any `@uns-kit/*` version, record the installed source version and intended target version.
|
|
27
28
|
- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.
|
|
28
29
|
- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.
|
|
29
30
|
- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.
|
|
31
|
+
- When crossing `<3.0.7` to `>=3.0.7`, update the application's direct `zod` dependency to Zod 4, migrate Zod-3-only project config extension APIs, and regenerate `config.schema.json` plus `src/config/app-config.ts`.
|
|
32
|
+
|
|
30
33
|
<!-- uns-kit:migrations:end -->
|
|
@@ -21,10 +21,13 @@ Pointers for AI/code-assist tools when working in this generated project.
|
|
|
21
21
|
- `pnpm run sync-uns-metadata -- --controller-url ... --token ...` -> pulls topics/tags/assets from the controller and regenerates local TS helpers
|
|
22
22
|
|
|
23
23
|
<!-- uns-kit:migrations:start -->
|
|
24
|
+
|
|
24
25
|
## UNS Kit dependency upgrades
|
|
25
26
|
|
|
26
27
|
- Before changing any `@uns-kit/*` version, record the installed source version and intended target version.
|
|
27
28
|
- After installing the target version, read `node_modules/@uns-kit/core/MIGRATIONS.md` and apply every migration whose version boundary is crossed. Do not apply unrelated migrations.
|
|
28
29
|
- When crossing `<2.0.71` to `>=2.0.71`, inspect MQTT proxy ownership and follow the documented shutdown migration. Process-owned and standalone proxies have different shutdown paths.
|
|
29
30
|
- When crossing `<3.0.0` to `>=3.0.0`, migrate MQTT `message.table.columns` publishers from named arrays to named objects and consumers to object-entry iteration. Keep schema `tableColumns` and Assistant/UI table formats unchanged.
|
|
31
|
+
- When crossing `<3.0.7` to `>=3.0.7`, update the application's direct `zod` dependency to Zod 4, migrate Zod-3-only project config extension APIs, and regenerate `config.schema.json` plus `src/config/app-config.ts`.
|
|
32
|
+
|
|
30
33
|
<!-- uns-kit:migrations:end -->
|