@intra-mart/accel 0.3.0 → 0.4.0-dev.202607140628

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 (67) hide show
  1. package/README.md +55 -12
  2. package/dist/asset/asset-tree.d.ts +5 -0
  3. package/dist/asset/asset-tree.js +7 -0
  4. package/dist/asset/deployer.d.ts +2 -1
  5. package/dist/asset/deployer.js +32 -59
  6. package/dist/asset/file-provider.js +19 -18
  7. package/dist/asset/git-provider.d.ts +14 -0
  8. package/dist/asset/git-provider.js +198 -0
  9. package/dist/asset/installer.d.ts +6 -0
  10. package/dist/asset/installer.js +31 -0
  11. package/dist/asset/renderer.d.ts +2 -0
  12. package/dist/asset/renderer.js +22 -0
  13. package/dist/asset/types.d.ts +1 -1
  14. package/dist/asset/updater.d.ts +52 -0
  15. package/dist/asset/updater.js +301 -0
  16. package/dist/asset/walker.d.ts +3 -2
  17. package/dist/asset/walker.js +67 -45
  18. package/dist/commands/asset-provider.d.ts +7 -0
  19. package/dist/commands/asset-provider.js +9 -0
  20. package/dist/commands/attach.d.ts +0 -4
  21. package/dist/commands/attach.js +11 -20
  22. package/dist/commands/deploy.d.ts +11 -6
  23. package/dist/commands/deploy.js +77 -23
  24. package/dist/commands/init.d.ts +0 -4
  25. package/dist/commands/init.js +11 -20
  26. package/dist/commands/update.d.ts +86 -0
  27. package/dist/commands/update.js +438 -0
  28. package/dist/core/constants.d.ts +3 -3
  29. package/dist/core/constants.js +4 -2
  30. package/dist/core/types.d.ts +11 -0
  31. package/dist/deploy/api-client.d.ts +6 -2
  32. package/dist/deploy/api-client.js +8 -4
  33. package/dist/deploy/deploy-files.d.ts +20 -0
  34. package/dist/deploy/deploy-files.js +37 -0
  35. package/dist/git/errors.d.ts +6 -0
  36. package/dist/git/errors.js +9 -0
  37. package/dist/git/http.d.ts +3 -0
  38. package/dist/git/http.js +58 -0
  39. package/dist/git/object-store.d.ts +13 -0
  40. package/dist/git/object-store.js +79 -0
  41. package/dist/git/pkt-line.d.ts +13 -0
  42. package/dist/git/pkt-line.js +41 -0
  43. package/dist/git/smart-http.d.ts +18 -0
  44. package/dist/git/smart-http.js +109 -0
  45. package/dist/i18n/en.js +50 -7
  46. package/dist/i18n/ja.js +50 -7
  47. package/dist/i18n/zh_CN.js +50 -7
  48. package/dist/index.js +4 -1
  49. package/dist/interactive/progress.js +1 -0
  50. package/dist/interactive/prompts.d.ts +7 -1
  51. package/dist/interactive/prompts.js +63 -64
  52. package/dist/markdown/section-replacement.js +34 -8
  53. package/dist/utils/args.d.ts +1 -0
  54. package/dist/utils/args.js +4 -0
  55. package/dist/utils/fs-list.d.ts +1 -0
  56. package/dist/utils/fs-list.js +11 -0
  57. package/dist/utils/merge-file.d.ts +6 -0
  58. package/dist/utils/merge-file.js +20 -0
  59. package/package.json +6 -8
  60. package/dist/asset/github-provider.d.ts +0 -2
  61. package/dist/asset/github-provider.js +0 -37
  62. package/dist/asset/local-provider.d.ts +0 -2
  63. package/dist/asset/local-provider.js +0 -24
  64. package/dist/utils/archive.d.ts +0 -3
  65. package/dist/utils/archive.js +0 -20
  66. package/dist/utils/https.d.ts +0 -2
  67. package/dist/utils/https.js +0 -44
@@ -0,0 +1,58 @@
1
+ import { fetch as undiciFetch, EnvHttpProxyAgent } from "undici";
2
+ import { createGitAuthError } from "./errors.js";
3
+ let dispatcher = null;
4
+ const getDispatcher = () => {
5
+ dispatcher ??= new EnvHttpProxyAgent();
6
+ return dispatcher;
7
+ };
8
+ export const normalizeRepoUrl = (url) => url.replace(/\/+$/, "");
9
+ const MAX_RESPONSE_BYTES = 256 * 1024 * 1024;
10
+ const ensureOk = (status, url, body) => {
11
+ if (status === 401 || status === 403) {
12
+ throw createGitAuthError(status, url);
13
+ }
14
+ throw new Error(`HTTP ${status} from ${url}${body ? `: ${body.slice(0, 200)}` : ""}`);
15
+ };
16
+ const readBody = async (res, url) => {
17
+ if (!res.body)
18
+ return Buffer.alloc(0);
19
+ const chunks = [];
20
+ let total = 0;
21
+ for await (const chunk of res.body) {
22
+ const buf = Buffer.from(chunk);
23
+ total += buf.length;
24
+ if (total > MAX_RESPONSE_BYTES) {
25
+ throw new Error(`Response from ${url} exceeded the maximum allowed size (${MAX_RESPONSE_BYTES} bytes)`);
26
+ }
27
+ chunks.push(buf);
28
+ }
29
+ return Buffer.concat(chunks);
30
+ };
31
+ export const getInfoRefs = async (repoUrl) => {
32
+ const url = `${normalizeRepoUrl(repoUrl)}/info/refs?service=git-upload-pack`;
33
+ const res = await undiciFetch(url, {
34
+ headers: { "Git-Protocol": "version=2" },
35
+ dispatcher: getDispatcher(),
36
+ });
37
+ if (!res.ok) {
38
+ ensureOk(res.status, url, await res.text().catch(() => ""));
39
+ }
40
+ return readBody(res, url);
41
+ };
42
+ export const postUploadPack = async (repoUrl, body) => {
43
+ const url = `${normalizeRepoUrl(repoUrl)}/git-upload-pack`;
44
+ const res = await undiciFetch(url, {
45
+ method: "POST",
46
+ headers: {
47
+ "Content-Type": "application/x-git-upload-pack-request",
48
+ Accept: "application/x-git-upload-pack-result",
49
+ "Git-Protocol": "version=2",
50
+ },
51
+ body,
52
+ dispatcher: getDispatcher(),
53
+ });
54
+ if (!res.ok) {
55
+ ensureOk(res.status, url, await res.text().catch(() => ""));
56
+ }
57
+ return readBody(res, url);
58
+ };
@@ -0,0 +1,13 @@
1
+ export type BlobEntry = {
2
+ path: string;
3
+ oid: string;
4
+ };
5
+ export type ObjectStore = {
6
+ dir: string;
7
+ writePack: (pack: Buffer, label: string) => Promise<void>;
8
+ listBlobEntries: (commitOid: string) => Promise<BlobEntry[]>;
9
+ readBlobAtPath: (commitOid: string, filepath: string) => Promise<string>;
10
+ hasObject: (oid: string) => Promise<boolean>;
11
+ cleanup: () => Promise<void>;
12
+ };
13
+ export declare const createObjectStore: () => Promise<ObjectStore>;
@@ -0,0 +1,79 @@
1
+ import fs from "node:fs";
2
+ import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+ import git, { Errors } from "isomorphic-git";
6
+ import { createGitObjectMissingError } from "./errors.js";
7
+ export const createObjectStore = async () => {
8
+ const dir = await mkdtemp(join(tmpdir(), "accel-assets-"));
9
+ await git.init({ fs, dir, defaultBranch: "main" });
10
+ await mkdir(join(dir, ".git", "objects", "pack"), { recursive: true });
11
+ const cache = {};
12
+ const blobEntriesByCommit = new Map();
13
+ const blobIndexByCommit = new Map();
14
+ const listBlobEntries = async (commitOid) => {
15
+ const cached = blobEntriesByCommit.get(commitOid);
16
+ if (cached)
17
+ return cached;
18
+ const entries = (await git.walk({
19
+ fs,
20
+ dir,
21
+ cache,
22
+ trees: [git.TREE({ ref: commitOid })],
23
+ map: async (filepath, [entry]) => {
24
+ if (!entry || filepath === ".")
25
+ return undefined;
26
+ if ((await entry.type()) !== "blob")
27
+ return undefined;
28
+ return { path: filepath, oid: await entry.oid() };
29
+ },
30
+ }));
31
+ blobEntriesByCommit.set(commitOid, entries);
32
+ return entries;
33
+ };
34
+ const getBlobOid = async (commitOid, filepath) => {
35
+ let index = blobIndexByCommit.get(commitOid);
36
+ if (!index) {
37
+ index = new Map((await listBlobEntries(commitOid)).map((e) => [e.path, e.oid]));
38
+ blobIndexByCommit.set(commitOid, index);
39
+ }
40
+ return index.get(filepath);
41
+ };
42
+ return {
43
+ dir,
44
+ writePack: async (pack, label) => {
45
+ const rel = join(".git", "objects", "pack", `pack-${label}.pack`);
46
+ await writeFile(join(dir, rel), pack);
47
+ await git.indexPack({ fs, dir, filepath: rel });
48
+ },
49
+ listBlobEntries,
50
+ readBlobAtPath: async (commitOid, filepath) => {
51
+ const blobOid = await getBlobOid(commitOid, filepath);
52
+ if (blobOid === undefined) {
53
+ throw new Error(`File not found in commit ${commitOid}: ${filepath}`);
54
+ }
55
+ try {
56
+ const { blob } = await git.readBlob({ fs, dir, cache, oid: blobOid });
57
+ return Buffer.from(blob).toString("utf-8");
58
+ }
59
+ catch (err) {
60
+ if (err instanceof Errors.NotFoundError) {
61
+ throw createGitObjectMissingError(filepath, blobOid);
62
+ }
63
+ throw err;
64
+ }
65
+ },
66
+ hasObject: async (oid) => {
67
+ try {
68
+ await git.expandOid({ fs, dir, cache, oid });
69
+ return true;
70
+ }
71
+ catch {
72
+ return false;
73
+ }
74
+ },
75
+ cleanup: async () => {
76
+ await rm(dir, { recursive: true, force: true }).catch(() => { });
77
+ },
78
+ };
79
+ };
@@ -0,0 +1,13 @@
1
+ export declare const FLUSH_PKT: Buffer<ArrayBuffer>;
2
+ export declare const DELIM_PKT: Buffer<ArrayBuffer>;
3
+ export declare const encodePktLine: (text: string) => Buffer;
4
+ export type PktLine = {
5
+ type: "flush";
6
+ } | {
7
+ type: "delim";
8
+ } | {
9
+ type: "data";
10
+ data: Buffer;
11
+ };
12
+ export declare function decodePktLines(buf: Buffer): Generator<PktLine>;
13
+ export declare const decodeDataLines: (buf: Buffer) => string[];
@@ -0,0 +1,41 @@
1
+ export const FLUSH_PKT = Buffer.from("0000");
2
+ export const DELIM_PKT = Buffer.from("0001");
3
+ export const encodePktLine = (text) => {
4
+ const payload = Buffer.from(text, "utf8");
5
+ const length = (payload.length + 4).toString(16).padStart(4, "0");
6
+ return Buffer.concat([Buffer.from(length, "ascii"), payload]);
7
+ };
8
+ export function* decodePktLines(buf) {
9
+ let offset = 0;
10
+ while (offset + 4 <= buf.length) {
11
+ const lengthField = buf.subarray(offset, offset + 4).toString("ascii");
12
+ const length = Number.parseInt(lengthField, 16);
13
+ if (Number.isNaN(length)) {
14
+ throw new Error(`Invalid pkt-line length field: ${lengthField}`);
15
+ }
16
+ if (length === 0) {
17
+ yield { type: "flush" };
18
+ offset += 4;
19
+ continue;
20
+ }
21
+ if (length === 1) {
22
+ yield { type: "delim" };
23
+ offset += 4;
24
+ continue;
25
+ }
26
+ if (length < 4 || offset + length > buf.length) {
27
+ throw new Error(`Invalid pkt-line length: ${length}`);
28
+ }
29
+ yield { type: "data", data: buf.subarray(offset + 4, offset + length) };
30
+ offset += length;
31
+ }
32
+ }
33
+ export const decodeDataLines = (buf) => {
34
+ const lines = [];
35
+ for (const pkt of decodePktLines(buf)) {
36
+ if (pkt.type === "data") {
37
+ lines.push(pkt.data.toString("utf8").replace(/\n$/, ""));
38
+ }
39
+ }
40
+ return lines;
41
+ };
@@ -0,0 +1,18 @@
1
+ export type ServerCapabilities = {
2
+ version2: boolean;
3
+ fetchFeatures: string[];
4
+ };
5
+ export declare const fetchCapabilities: (repoUrl: string) => Promise<ServerCapabilities>;
6
+ export declare const assertServerSupported: (repoUrl: string, caps: ServerCapabilities) => void;
7
+ export declare const isValidOid: (value: string) => boolean;
8
+ export declare const isValidRefName: (ref: string) => boolean;
9
+ export type ResolvedRef = {
10
+ oid: string;
11
+ fullRef: string;
12
+ };
13
+ export declare const resolveRef: (repoUrl: string, ref: string) => Promise<ResolvedRef | null>;
14
+ export type FetchPackOptions = {
15
+ deepenOne?: boolean;
16
+ filterBlobNone?: boolean;
17
+ };
18
+ export declare const fetchPack: (repoUrl: string, wants: string[], options?: FetchPackOptions) => Promise<Buffer>;
@@ -0,0 +1,109 @@
1
+ import { DELIM_PKT, FLUSH_PKT, decodeDataLines, decodePktLines, encodePktLine, } from "./pkt-line.js";
2
+ import { createGitServerUnsupportedError } from "./errors.js";
3
+ import { getInfoRefs, postUploadPack } from "./http.js";
4
+ const AGENT = "agent=accel-cli";
5
+ export const fetchCapabilities = async (repoUrl) => {
6
+ const buf = await getInfoRefs(repoUrl);
7
+ const lines = decodeDataLines(buf);
8
+ const version2 = lines.some((l) => l.trim() === "version 2");
9
+ const fetchLine = lines.find((l) => l.startsWith("fetch="));
10
+ return {
11
+ version2,
12
+ fetchFeatures: fetchLine ? fetchLine.slice("fetch=".length).split(" ") : [],
13
+ };
14
+ };
15
+ export const assertServerSupported = (repoUrl, caps) => {
16
+ if (!caps.version2) {
17
+ throw createGitServerUnsupportedError(repoUrl, "protocol v2");
18
+ }
19
+ if (!caps.fetchFeatures.includes("filter")) {
20
+ throw createGitServerUnsupportedError(repoUrl, "fetch filter");
21
+ }
22
+ };
23
+ const buildCommandBody = (command, args) => Buffer.concat([
24
+ encodePktLine(`command=${command}\n`),
25
+ encodePktLine(`${AGENT}\n`),
26
+ encodePktLine("object-format=sha1\n"),
27
+ DELIM_PKT,
28
+ ...args.map((a) => encodePktLine(`${a}\n`)),
29
+ FLUSH_PKT,
30
+ ]);
31
+ const OID_PATTERN = /^[0-9a-f]{40}$/;
32
+ export const isValidOid = (value) => OID_PATTERN.test(value);
33
+ export const isValidRefName = (ref) => ref.length > 0 &&
34
+ ref.length <= 255 &&
35
+ !/[\x00-\x20\x7f~^:?*[\\]/.test(ref) &&
36
+ !ref.includes("..") &&
37
+ !ref.startsWith("-") &&
38
+ !ref.startsWith("/") &&
39
+ !ref.endsWith("/") &&
40
+ !ref.endsWith(".lock");
41
+ export const resolveRef = async (repoUrl, ref) => {
42
+ if (!isValidRefName(ref)) {
43
+ throw new Error(`Invalid ref name: ${JSON.stringify(ref)}`);
44
+ }
45
+ const buf = await postUploadPack(repoUrl, buildCommandBody("ls-refs", [
46
+ "peel",
47
+ `ref-prefix refs/heads/${ref}`,
48
+ `ref-prefix refs/tags/${ref}`,
49
+ ]));
50
+ const entries = new Map();
51
+ for (const line of decodeDataLines(buf)) {
52
+ const [oid, name, ...rest] = line.split(" ");
53
+ if (!oid || !name)
54
+ continue;
55
+ const peeled = rest.find((r) => r.startsWith("peeled:"));
56
+ entries.set(name, peeled ? peeled.slice("peeled:".length) : oid);
57
+ }
58
+ for (const fullRef of [`refs/heads/${ref}`, `refs/tags/${ref}`]) {
59
+ const oid = entries.get(fullRef);
60
+ if (oid)
61
+ return { oid, fullRef };
62
+ }
63
+ return null;
64
+ };
65
+ export const fetchPack = async (repoUrl, wants, options = {}) => {
66
+ if (wants.length === 0) {
67
+ return Buffer.alloc(0);
68
+ }
69
+ const invalidWant = wants.find((w) => !isValidOid(w));
70
+ if (invalidWant !== undefined) {
71
+ throw new Error(`Invalid object id: ${JSON.stringify(invalidWant)}`);
72
+ }
73
+ const args = [
74
+ ...wants.map((w) => `want ${w}`),
75
+ ...(options.deepenOne ? ["deepen 1"] : []),
76
+ ...(options.filterBlobNone ? ["filter blob:none"] : []),
77
+ "no-progress",
78
+ "done",
79
+ ];
80
+ const buf = await postUploadPack(repoUrl, buildCommandBody("fetch", args));
81
+ const chunks = [];
82
+ let inPackfile = false;
83
+ for (const pkt of decodePktLines(buf)) {
84
+ if (pkt.type !== "data")
85
+ continue;
86
+ if (inPackfile) {
87
+ const band = pkt.data[0];
88
+ if (band === 1) {
89
+ chunks.push(pkt.data.subarray(1));
90
+ }
91
+ else if (band === 3) {
92
+ throw new Error(`git server error: ${pkt.data.subarray(1).toString("utf8").trim()}`);
93
+ }
94
+ continue;
95
+ }
96
+ const text = pkt.data.toString("utf8");
97
+ if (text === "packfile\n") {
98
+ inPackfile = true;
99
+ continue;
100
+ }
101
+ if (text.startsWith("ERR ")) {
102
+ throw new Error(`git server error: ${text.slice(4).trim()}`);
103
+ }
104
+ }
105
+ if (chunks.length === 0) {
106
+ throw new Error(`git server returned no packfile for wants: ${wants.slice(0, 3).join(", ")}${wants.length > 3 ? ", ..." : ""}`);
107
+ }
108
+ return Buffer.concat(chunks);
109
+ };
package/dist/i18n/en.js CHANGED
@@ -6,7 +6,7 @@ export const messages = {
6
6
  "prompt.artifactId": "Enter artifact ID (Maven artifactId)",
7
7
  "prompt.artifactId.hint": "Recorded in pom.xml as the Maven artifactId (the artifact's identifier)\nThe identifier that forms the built artifact's file name (jar/war) and Maven coordinates. Defaults to the project name; change only if you want a different identifier",
8
8
  "prompt.jugglingProject": "Enter IM-Juggling project path (optional)",
9
- "prompt.jugglingProject.hint": "If set, the iAP version and modules are auto-detected from juggling.im\nPath to an existing IM-Juggling project directory you want to link; leave empty to skip (e.g. ../customer-portal-juggling)",
9
+ "prompt.jugglingProject.hint": "If set, the iAP version and modules are auto-detected from juggling.im\nPath to an existing IM-Juggling project directory you want to link (e.g. ../customer-portal-juggling)\nLeave empty for no link (in update, this clears the recorded link)",
10
10
  "prompt.accelplatformVersion": "Select iAP version",
11
11
  "prompt.accelplatformVersion.hint": "iAP release version. The deployed assets (CLAUDE.md, etc.) adapt to this version",
12
12
  "prompt.modules": "Select modules to use",
@@ -27,8 +27,9 @@ export const messages = {
27
27
  "prompt.agent.hint": "claude-code deploys under .claude/, codex deploys under .codex/, github-copilot deploys under .github/ (instructions, skills, etc.)",
28
28
  "prompt.withGit": "Initialize Git repository?",
29
29
  "prompt.withGit.hint": "Runs git init inside the created project directory",
30
+ "prompt.useExistingSettings": "Use the existing settings?",
31
+ "prompt.useExistingSettings.hint": "Yes: skip re-entering each setting and update assets with the current settings / No: re-enter each setting",
30
32
  "juggling.detected.version": "Detected version from juggling.im: {version}",
31
- "juggling.detected.modules": "Detected modules from juggling.im: {modules}",
32
33
  "juggling.notFound": "juggling.im not found at specified path: {path}",
33
34
  "juggling.versionUnknown": "The juggling.im version {version} is not in the catalog. Select the version and modules manually.",
34
35
  "warning.versionMismatch": "Specified iAP version ({option}) differs from juggling.im ({juggling}). Using specified value.",
@@ -49,6 +50,41 @@ export const messages = {
49
50
  "detach.complete": "Detach complete. {skipped} file(s) were skipped due to user modifications.",
50
51
  "detach.completeAll": "Detach complete. All assets removed.",
51
52
  "detach.cancelled": "Detach cancelled.",
53
+ "intro.update": "Updates deployed assets to the latest revision of the asset repository.\nFiles you have edited are preserved.\nReview the settings, then apply the changes.",
54
+ "update.error.legacyProject": "This project was created with a CLI version that does not support update.",
55
+ "update.error.notGitSource": "Only projects deployed from a git source can be updated (this project was deployed from a local directory).",
56
+ "update.error.baseFetch": "Failed to fetch the base commit {commit} (history may have been rewritten): {message}",
57
+ "update.warning.dirty": "The project has uncommitted changes. Committing before update is recommended.",
58
+ "update.confirmDirty": "There are uncommitted changes. Continue?",
59
+ "update.invalidSettings": "The existing settings contain invalid values. Re-enter each setting:\n{errors}",
60
+ "update.confirmApply": "Apply the update with these settings?",
61
+ "update.cancelled": "Update cancelled.",
62
+ "update.progress.range": "Updating assets... ({from} → {to})",
63
+ "update.result.updated": "Updated: {path}",
64
+ "update.result.merged": "Updated: {path} (merged with your edits)",
65
+ "update.result.kept": "Kept: {path} (edited by you, no upstream change)",
66
+ "update.result.keptDeleted": "Kept: {path} (deleted by you)",
67
+ "update.result.deleted": "Deleted: {path} (no longer deployed)",
68
+ "update.result.redeployed": "Redeployed: {path}",
69
+ "update.result.added": "Added: {path}",
70
+ "update.result.adopted": "Adopted: {path} (identical to the existing file)",
71
+ "update.result.conflict": "Conflict: {path}",
72
+ "update.result.keptWarn": "Kept: {path} (no longer deployed upstream, but preserved because you edited it)",
73
+ "update.upToDate": "Everything is up to date. Nothing to update.",
74
+ "update.complete": "Update complete. Updated {updated}, kept {kept}, deleted {deleted} file(s).",
75
+ "update.conflictSummary": "{count} conflict(s) found. Review the markers (<<<<<<<) and resolve them manually:",
76
+ "update.error.keepEditedWithoutAllow": "--keep-edited can only be used together with --allow-missing-base.",
77
+ "update.error.baseFetchHint": "To continue in fallback mode, pass --allow-missing-base (add --keep-edited to keep edited files and skip them). If the asset repository moved, point to the new location with --asset-server-url / --asset-ref. As a last resort, run accel detach and re-run init.",
78
+ "update.fallback.editedCount": "Without the base commit, upstream changes to edited files cannot be detected. Edited files that differ from upstream: {count}",
79
+ "update.fallback.choice": "How would you like to proceed?",
80
+ "update.fallback.choice.abort": "Abort",
81
+ "update.fallback.choice.conflict": "Continue in fallback mode (insert conflict markers into edited files)",
82
+ "update.fallback.choice.keep": "Continue in fallback mode (keep edited files and skip them)",
83
+ "update.fallback.continuing": "Continuing in fallback mode without the base commit (classification uses hashsum-based edit detection only).",
84
+ "update.fallback.aborted": "Update aborted.",
85
+ "update.result.redeployedWarn": "Redeployed: {path} (you had deleted it, but upstream changes could not be determined without the base commit)",
86
+ "update.result.skippedEdited": "Kept: {path} (edited; skipped without applying upstream changes)",
87
+ "update.fallback.skippedSummary": "Skipped {count} edited file(s) without applying upstream changes:",
52
88
  "error.directoryExists": "Directory already exists: {path}",
53
89
  "error.accelExists": ".accel directory already exists",
54
90
  "error.accelNotFound": ".accel directory not found",
@@ -64,6 +100,9 @@ export const messages = {
64
100
  "error.invalidArtifactId": "Artifact ID violates Maven naming rules (^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
65
101
  "error.invalidGroup": "Group name violates Maven groupId naming rules (dot-separated Java identifiers): {value}",
66
102
  "error.invalidProjectVersion": "Project version violates Maven version naming rules (^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
103
+ "error.gitAuthHint": "The repository requires authentication (HTTP 401/403). Private repositories that require authentication are not supported. Please specify the URL of a public repository.",
104
+ "error.gitServerUnsupported": "This server does not support the git features required to fetch assets (smart HTTP protocol v2 / filter). Please use a major git hosting service such as GitHub, GitLab, or Gitea.",
105
+ "error.gitUrlUnsupported": "Asset repository URLs must use HTTP(S) (SSH and file:// are not supported): {url}",
67
106
  "summary.heading": "Deployment settings",
68
107
  "summary.label.name": "Project name",
69
108
  "summary.label.artifactId": "Artifact ID",
@@ -82,6 +121,7 @@ export const messages = {
82
121
  "summary.outputDir": "Output directory",
83
122
  "summary.empty": "(none)",
84
123
  "progress.fetching": "Fetching asset repository...",
124
+ "progress.downloading": "Downloading assets...",
85
125
  "progress.deploying.section": "Deploying under {section} ({files})",
86
126
  "progress.deploying.root": "Deploying root-level files ({files})",
87
127
  "progress.installing": "Running {command}...",
@@ -92,7 +132,7 @@ export const messages = {
92
132
  "nextSteps.cd": "cd {path}",
93
133
  "nextSteps.agent.claudeCode": "Run claude to start agent-driven development",
94
134
  "nextSteps.agent.codex": "Run codex to start agent-driven development",
95
- "nextSteps.agent.githubCopilot": "Run gh copilot to start agent-driven development",
135
+ "nextSteps.agent.githubCopilot": "Run copilot to start agent-driven development",
96
136
  "credentials.prompt.endpoint": "Enter the iAP endpoint (base URL)",
97
137
  "credentials.prompt.endpoint.hint": "Specify the iAP base URL (e.g. https://example.com/imart). The API path (/api/bearer/...) is assembled automatically",
98
138
  "credentials.prompt.apiKey": "Enter the API key (OAuth Bearer token)",
@@ -116,8 +156,10 @@ export const messages = {
116
156
  "deploy.confirm": "Deploy with the following settings. Continue?",
117
157
  "deploy.confirm.endpoint": "Endpoint",
118
158
  "deploy.confirm.stagingId": "Staging",
119
- "deploy.confirm.sourceFile": "Source file",
120
- "deploy.confirm.sentAs": "Sent as",
159
+ "deploy.confirm.files": "Files to deploy (in send order)",
160
+ "deploy.order.heading": "Deploy order",
161
+ "deploy.order.confirm": "Deploy in this order?",
162
+ "deploy.order.selectNext": "Select the file to deploy at position {position} (of {total})",
121
163
  "deploy.result.deployId": "Deploy ID",
122
164
  "deploy.result.stagingId": "Staging",
123
165
  "deploy.result.status": "Status",
@@ -129,6 +171,9 @@ export const messages = {
129
171
  "deploy.error.missingStagingId": "--staging-id is required in non-interactive mode. Specify the target staging ID.",
130
172
  "deploy.error.zipNotResolved": "Could not uniquely determine the zip to deploy. Specify the file explicitly with --file.",
131
173
  "deploy.error.fileNotFound": "The specified file was not found: {path}",
174
+ "deploy.error.additionalFileNotFound": "The specified additional file was not found: {path}",
175
+ "deploy.error.additionalFileInvalidExtension": "Additional files must be .imm or .zip: {path}",
176
+ "deploy.error.additionalFileDuplicate": "The same file is specified more than once: {path}",
132
177
  "deploy.error.network": "Could not connect to iAP: {message}",
133
178
  "deploy.error.server": "iAP returned an error: {message}",
134
179
  "deploy.error.unauthorized": "Authentication failed (401). Check that the API key is correct.",
@@ -137,8 +182,6 @@ export const messages = {
137
182
  "deploy.error.badRequest": "Bad request (400).",
138
183
  "deploy.error.serverError": "A server error occurred (500).",
139
184
  "deploy.error.unexpectedResponse": "Received an unexpected response (HTTP {status}).",
140
- "deploy.reauth.notFound": "The endpoint could not be reached (404). Check that the endpoint URL is correct.",
141
- "deploy.reauth.notice": "Please re-enter your connection information.",
142
185
  "deploy.result.shortcutUrl": "Shortcut URL",
143
186
  "deploy.setup.heading": "Tenant Environment Setup Configs",
144
187
  "deploy.setup.confirm": "Run tenant environment setup?",
package/dist/i18n/ja.js CHANGED
@@ -6,7 +6,7 @@ export const messages = {
6
6
  "prompt.artifactId": "アーティファクトID(pomのartifactId)を入力してください",
7
7
  "prompt.artifactId.hint": "Maven の artifactId として pom.xml に記録されます(成果物のID)\n成果物 (jar/war 等) のファイル名や、Maven で依存関係を識別するための ID の一部として使われます。デフォルトはプロジェクト名と同じ値で、別の識別子を使いたい場合のみ変更してください",
8
8
  "prompt.jugglingProject": "IM-Jugglingプロジェクトのパスを入力してください(省略可)",
9
- "prompt.jugglingProject.hint": "指定すると juggling.im から iAPバージョンとモジュールを自動検出します\n連携したい既存の IM-Juggling プロジェクトのディレクトリパスを指定してください(例: ../customer-portal-juggling)",
9
+ "prompt.jugglingProject.hint": "指定すると juggling.im から iAPバージョンとモジュールを自動検出します\n連携したい既存の IM-Juggling プロジェクトのディレクトリパスを指定してください(例: ../customer-portal-juggling)\n空のまま確定すると連携なし(update では記録済みの連携を解除します)",
10
10
  "prompt.accelplatformVersion": "iAPバージョンを選択してください",
11
11
  "prompt.accelplatformVersion.hint": "iAP本体のリリース版。配備される資材(CLAUDE.md 等)の内容がこのバージョンに合わせて変化します",
12
12
  "prompt.modules": "利用するモジュールを選択してください",
@@ -27,8 +27,9 @@ export const messages = {
27
27
  "prompt.agent.hint": "claude-code → .claude/ 配下、codex → .codex/ 配下、github-copilot → .github/ 配下に、指示書や skills などを配備します",
28
28
  "prompt.withGit": "Gitリポジトリを初期化しますか?",
29
29
  "prompt.withGit.hint": "作成したプロジェクトディレクトリで git init を実行します",
30
+ "prompt.useExistingSettings": "既存の設定を利用しますか?",
31
+ "prompt.useExistingSettings.hint": "Yes: 各設定の再入力をスキップし、現在の設定のまま資材を更新します / No: 各設定を再入力します",
30
32
  "juggling.detected.version": "juggling.imからバージョンを検出: {version}",
31
- "juggling.detected.modules": "juggling.imからモジュールを検出: {modules}",
32
33
  "juggling.notFound": "指定されたパスにjuggling.imが見つかりません: {path}",
33
34
  "juggling.versionUnknown": "juggling.imのバージョン {version} はカタログに存在しません。バージョンとモジュールを手動で選択してください。",
34
35
  "warning.versionMismatch": "指定されたiAPバージョン ({option}) とjuggling.imのバージョン ({juggling}) が異なります。指定値を優先します。",
@@ -49,6 +50,41 @@ export const messages = {
49
50
  "detach.complete": "detachが完了しました。{skipped}件のファイルはユーザーによる変更が検出されたためスキップしました。",
50
51
  "detach.completeAll": "detachが完了しました。すべての資材を削除しました。",
51
52
  "detach.cancelled": "detachをキャンセルしました。",
53
+ "intro.update": "配備済みの資材を資材リポジトリの最新版へ更新します。\nユーザーが編集したファイルの内容は保持されます。\n設定を確認したあと、差分を適用します。",
54
+ "update.error.legacyProject": "このプロジェクトは update 未対応のCLIバージョンで作成されています。",
55
+ "update.error.notGitSource": "gitソースから配備されたプロジェクトのみ update できます(このプロジェクトはローカルディレクトリから配備されています)。",
56
+ "update.error.baseFetch": "更新の基準となるコミット {commit} を取得できませんでした(履歴が書き換えられた可能性があります): {message}",
57
+ "update.warning.dirty": "プロジェクトに未コミットの変更があります。update の前にコミットしておくことを推奨します。",
58
+ "update.confirmDirty": "未コミットの変更がありますが、続行しますか?",
59
+ "update.invalidSettings": "既存の設定に不正な値があるため、各設定を再入力してください:\n{errors}",
60
+ "update.confirmApply": "この内容でプロジェクトを更新します。よろしいですか?",
61
+ "update.cancelled": "updateをキャンセルしました。",
62
+ "update.progress.range": "資材を更新しています... ({from} → {to})",
63
+ "update.result.updated": "更新: {path}",
64
+ "update.result.merged": "更新: {path} (ユーザー編集とマージ)",
65
+ "update.result.kept": "保持: {path} (ユーザー編集あり、上流変更なし)",
66
+ "update.result.keptDeleted": "保持: {path} (ユーザーが削除)",
67
+ "update.result.deleted": "削除: {path} (配備対象外)",
68
+ "update.result.redeployed": "再配置: {path}",
69
+ "update.result.added": "追加: {path}",
70
+ "update.result.adopted": "取り込み: {path} (既存ファイルと内容一致)",
71
+ "update.result.conflict": "コンフリクト: {path}",
72
+ "update.result.keptWarn": "保持: {path} (上流では配備対象外になりましたが、ユーザー編集があるため残します)",
73
+ "update.upToDate": "すべて最新の状態です。更新はありません。",
74
+ "update.complete": "updateが完了しました。{updated}件を更新、{kept}件を保持、{deleted}件を削除しました。",
75
+ "update.conflictSummary": "{count}件のコンフリクトがあります。マーカー(<<<<<<<)を確認して手動で解決してください:",
76
+ "update.error.keepEditedWithoutAllow": "--keep-edited は --allow-missing-base と併用する場合のみ指定できます。",
77
+ "update.error.baseFetchHint": "フォールバックモードで続行するには --allow-missing-base を指定してください(--keep-edited 併用で編集済みファイルを保持してスキップ)。資材リポジトリが移転した場合は --asset-server-url / --asset-ref で取得元を変更できます。最終手段として accel detach 後に再度 init する方法もあります。",
78
+ "update.fallback.editedCount": "基準コミット(base)なしで続行する場合、編集済みファイルの上流変更は判定できません。上流と差分のある編集済みファイル: {count}件",
79
+ "update.fallback.choice": "どのように続行しますか?",
80
+ "update.fallback.choice.abort": "中止する",
81
+ "update.fallback.choice.conflict": "フォールバックモードで続行する(編集済みファイルにはコンフリクトマーカーを挿入)",
82
+ "update.fallback.choice.keep": "フォールバックモードで続行する(編集済みファイルは保持してスキップ)",
83
+ "update.fallback.continuing": "基準コミットなしのフォールバックモードで続行します(hashsum による編集検出のみで分類します)。",
84
+ "update.fallback.aborted": "updateを中止しました。",
85
+ "update.result.redeployedWarn": "再配置: {path} (ユーザーが削除していましたが、上流変更の有無を判定できないため再配置しました)",
86
+ "update.result.skippedEdited": "保持: {path} (編集済みのためスキップ。上流の変更は取り込まれていません)",
87
+ "update.fallback.skippedSummary": "{count}件の編集済みファイルをスキップしました。上流の変更は取り込まれていません:",
52
88
  "error.directoryExists": "ディレクトリが既に存在します: {path}",
53
89
  "error.accelExists": ".accelディレクトリが既に存在します",
54
90
  "error.accelNotFound": ".accelディレクトリが見つかりません",
@@ -64,6 +100,9 @@ export const messages = {
64
100
  "error.invalidArtifactId": "アーティファクトIDが Maven の規約に違反しています(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
65
101
  "error.invalidGroup": "グループ名が Maven groupId の規約に違反しています(ドット区切りのJava識別子): {value}",
66
102
  "error.invalidProjectVersion": "プロジェクトバージョンが Maven version の規約に違反しています(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
103
+ "error.gitAuthHint": "リポジトリが認証を要求しました(HTTP 401/403)。認証が必要なプライベートリポジトリには対応していません。公開リポジトリの URL を指定してください。",
104
+ "error.gitServerUnsupported": "このサーバは資材の取得に必要な git 機能(smart HTTP protocol v2 / filter)に対応していません。GitHub / GitLab / Gitea などの主要 git ホスティングサービスをご利用ください。",
105
+ "error.gitUrlUnsupported": "資材リポジトリの URL は HTTP(S) のみ対応しています(SSH / file:// は利用できません): {url}",
67
106
  "summary.heading": "配備設定",
68
107
  "summary.label.name": "プロジェクト名",
69
108
  "summary.label.artifactId": "アーティファクトID",
@@ -82,6 +121,7 @@ export const messages = {
82
121
  "summary.outputDir": "出力先",
83
122
  "summary.empty": "(なし)",
84
123
  "progress.fetching": "資材リポジトリを取得しています...",
124
+ "progress.downloading": "資材をダウンロードしています...",
85
125
  "progress.deploying.section": "{section} 配下を配備中 ({files})",
86
126
  "progress.deploying.root": "ルート直下を配備中 ({files})",
87
127
  "progress.installing": "{command} を実行しています...",
@@ -92,7 +132,7 @@ export const messages = {
92
132
  "nextSteps.cd": "cd {path}",
93
133
  "nextSteps.agent.claudeCode": "claude を起動してエージェント開発を始めてください",
94
134
  "nextSteps.agent.codex": "codex を起動してエージェント開発を始めてください",
95
- "nextSteps.agent.githubCopilot": "gh copilot を起動してエージェント開発を始めてください",
135
+ "nextSteps.agent.githubCopilot": "copilot を起動してエージェント開発を始めてください",
96
136
  "credentials.prompt.endpoint": "iAP のエンドポイント(ベースURL)を入力してください",
97
137
  "credentials.prompt.endpoint.hint": "iAP のベースURL を指定してください(例: https://example.com/imart)。API パス(/api/bearer/...)は自動で組み立てられます",
98
138
  "credentials.prompt.apiKey": "APIキー(OAuth Bearer トークン)を入力してください",
@@ -116,8 +156,10 @@ export const messages = {
116
156
  "deploy.confirm": "以下の内容でデプロイします。よろしいですか?",
117
157
  "deploy.confirm.endpoint": "エンドポイント",
118
158
  "deploy.confirm.stagingId": "ステージング",
119
- "deploy.confirm.sourceFile": "対象ファイル",
120
- "deploy.confirm.sentAs": "送信ファイル名",
159
+ "deploy.confirm.files": "デプロイするファイル(送信順)",
160
+ "deploy.order.heading": "デプロイ順",
161
+ "deploy.order.confirm": "この順番でデプロイしますか?",
162
+ "deploy.order.selectNext": "{position} 番目(全 {total} 件)にデプロイするファイルを選択してください",
121
163
  "deploy.result.deployId": "デプロイID",
122
164
  "deploy.result.stagingId": "ステージング",
123
165
  "deploy.result.status": "ステータス",
@@ -129,6 +171,9 @@ export const messages = {
129
171
  "deploy.error.missingStagingId": "非対話モードでは --staging-id が必須です。デプロイ先のステージングIDを指定してください。",
130
172
  "deploy.error.zipNotResolved": "デプロイ対象の zip を一意に特定できませんでした。--file でデプロイするファイルを明示してください。",
131
173
  "deploy.error.fileNotFound": "指定されたファイルが見つかりません: {path}",
174
+ "deploy.error.additionalFileNotFound": "追加指定されたファイルが見つかりません: {path}",
175
+ "deploy.error.additionalFileInvalidExtension": "追加指定できるファイルは .imm / .zip のみです: {path}",
176
+ "deploy.error.additionalFileDuplicate": "同じファイルが重複して指定されています: {path}",
132
177
  "deploy.error.network": "iAP に接続できませんでした: {message}",
133
178
  "deploy.error.server": "iAP からエラーが返されました: {message}",
134
179
  "deploy.error.unauthorized": "認証に失敗しました(401)。APIキーが正しいか確認してください。",
@@ -137,8 +182,6 @@ export const messages = {
137
182
  "deploy.error.badRequest": "リクエストが不正です(400)。",
138
183
  "deploy.error.serverError": "サーバーエラーが発生しました(500)。",
139
184
  "deploy.error.unexpectedResponse": "想定外のレスポンスを受信しました(HTTP {status})。",
140
- "deploy.reauth.notFound": "指定されたエンドポイントにアクセスできません(404)。エンドポイントの URL が正しいか確認してください。",
141
- "deploy.reauth.notice": "接続情報を再入力してください。",
142
185
  "deploy.result.shortcutUrl": "ショートカットURL",
143
186
  "deploy.setup.heading": "テナント環境セットアップ設定",
144
187
  "deploy.setup.confirm": "テナント環境セットアップを実行しますか?",