@ozyman42/ozy-cli 0.4.8 → 0.4.9-darwin-arm64.0

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 (207) hide show
  1. package/multi-call-binary +0 -0
  2. package/package.json +11 -52
  3. package/bin/ozy +0 -191
  4. package/bin/ozy-signing-agent +0 -191
  5. package/bin/ozy-ssh-keygen +0 -191
  6. package/bin/ozy-virtual-security-key +0 -191
  7. package/dist/commands/git/hosts.js +0 -18
  8. package/dist/commands/git/hosts.js.map +0 -1
  9. package/dist/commands/git/index.js +0 -8
  10. package/dist/commands/git/index.js.map +0 -1
  11. package/dist/commands/git/setup.js +0 -145
  12. package/dist/commands/git/setup.js.map +0 -1
  13. package/dist/commands/index.js +0 -13
  14. package/dist/commands/index.js.map +0 -1
  15. package/dist/commands/npm/index.js +0 -7
  16. package/dist/commands/npm/index.js.map +0 -1
  17. package/dist/commands/npm/setup/git-remote.js +0 -66
  18. package/dist/commands/npm/setup/git-remote.js.map +0 -1
  19. package/dist/commands/npm/setup/index.js +0 -168
  20. package/dist/commands/npm/setup/index.js.map +0 -1
  21. package/dist/commands/npm/setup/npm-auth.js +0 -62
  22. package/dist/commands/npm/setup/npm-auth.js.map +0 -1
  23. package/dist/commands/npm/setup/package-json-validate.js +0 -47
  24. package/dist/commands/npm/setup/package-json-validate.js.map +0 -1
  25. package/dist/commands/npm/setup/package-registry.js +0 -20
  26. package/dist/commands/npm/setup/package-registry.js.map +0 -1
  27. package/dist/commands/npm/setup/setup.test.js +0 -95
  28. package/dist/commands/npm/setup/setup.test.js.map +0 -1
  29. package/dist/commands/npm/setup/trusted-publishing.js +0 -84
  30. package/dist/commands/npm/setup/trusted-publishing.js.map +0 -1
  31. package/dist/commands/npm/setup/workflow.js +0 -19
  32. package/dist/commands/npm/setup/workflow.js.map +0 -1
  33. package/dist/commands/ssh/get-sk-credential.js +0 -104
  34. package/dist/commands/ssh/get-sk-credential.js.map +0 -1
  35. package/dist/commands/ssh/index.js +0 -7
  36. package/dist/commands/ssh/index.js.map +0 -1
  37. package/dist/commands/upgrade.js +0 -199
  38. package/dist/commands/upgrade.js.map +0 -1
  39. package/dist/common/command.js +0 -15
  40. package/dist/common/command.js.map +0 -1
  41. package/dist/common/constants.js +0 -25
  42. package/dist/common/constants.js.map +0 -1
  43. package/dist/common/effective-modules-extensions.js +0 -13
  44. package/dist/common/effective-modules-extensions.js.map +0 -1
  45. package/dist/common/log.js +0 -4
  46. package/dist/common/log.js.map +0 -1
  47. package/dist/common/render-caller-tree.js +0 -20
  48. package/dist/common/render-caller-tree.js.map +0 -1
  49. package/dist/entrypoints/ozy-signing-agent.js +0 -48
  50. package/dist/entrypoints/ozy-signing-agent.js.map +0 -1
  51. package/dist/entrypoints/ozy-ssh-keygen.js +0 -9
  52. package/dist/entrypoints/ozy-ssh-keygen.js.map +0 -1
  53. package/dist/entrypoints/ozy-virtual-security-key.js +0 -18
  54. package/dist/entrypoints/ozy-virtual-security-key.js.map +0 -1
  55. package/dist/entrypoints/ozy.js +0 -3
  56. package/dist/entrypoints/ozy.js.map +0 -1
  57. package/dist/index.js +0 -2
  58. package/dist/index.js.map +0 -1
  59. package/dist/internal/thing.js +0 -4
  60. package/dist/internal/thing.js.map +0 -1
  61. package/dist/modules/cli/agent-client/impl.js +0 -109
  62. package/dist/modules/cli/agent-client/impl.js.map +0 -1
  63. package/dist/modules/cli/agent-client/interface.js +0 -11
  64. package/dist/modules/cli/agent-client/interface.js.map +0 -1
  65. package/dist/modules/cli/git/impl.js +0 -124
  66. package/dist/modules/cli/git/impl.js.map +0 -1
  67. package/dist/modules/cli/git/interface.js +0 -3
  68. package/dist/modules/cli/git/interface.js.map +0 -1
  69. package/dist/modules/cli/git/submodule/fix.js +0 -257
  70. package/dist/modules/cli/git/submodule/fix.js.map +0 -1
  71. package/dist/modules/cli/git/submodule/git-state.js +0 -154
  72. package/dist/modules/cli/git/submodule/git-state.js.map +0 -1
  73. package/dist/modules/cli/git/submodule/gitmodules.js +0 -113
  74. package/dist/modules/cli/git/submodule/gitmodules.js.map +0 -1
  75. package/dist/modules/cli/git/submodule/printer.js +0 -232
  76. package/dist/modules/cli/git/submodule/printer.js.map +0 -1
  77. package/dist/modules/cli/git/submodule/resolve-git-dir.js +0 -16
  78. package/dist/modules/cli/git/submodule/resolve-git-dir.js.map +0 -1
  79. package/dist/modules/cli/github/impl.js +0 -137
  80. package/dist/modules/cli/github/impl.js.map +0 -1
  81. package/dist/modules/cli/github/interface.js +0 -2
  82. package/dist/modules/cli/github/interface.js.map +0 -1
  83. package/dist/modules/cli/index.js +0 -9
  84. package/dist/modules/cli/index.js.map +0 -1
  85. package/dist/modules/common/crypto/impl.js +0 -133
  86. package/dist/modules/common/crypto/impl.js.map +0 -1
  87. package/dist/modules/common/crypto/interface.js +0 -2
  88. package/dist/modules/common/crypto/interface.js.map +0 -1
  89. package/dist/modules/common/index.js +0 -10
  90. package/dist/modules/common/index.js.map +0 -1
  91. package/dist/modules/common/kep-map-store/impl.js +0 -42
  92. package/dist/modules/common/kep-map-store/impl.js.map +0 -1
  93. package/dist/modules/common/kep-map-store/interface.js +0 -2
  94. package/dist/modules/common/kep-map-store/interface.js.map +0 -1
  95. package/dist/modules/common/os-platform/caller-info.js +0 -132
  96. package/dist/modules/common/os-platform/caller-info.js.map +0 -1
  97. package/dist/modules/common/os-platform/impl.js +0 -95
  98. package/dist/modules/common/os-platform/impl.js.map +0 -1
  99. package/dist/modules/common/os-platform/interface.js +0 -2
  100. package/dist/modules/common/os-platform/interface.js.map +0 -1
  101. package/dist/modules/common/os-platform/virtual-hid/index.js +0 -12
  102. package/dist/modules/common/os-platform/virtual-hid/index.js.map +0 -1
  103. package/dist/modules/common/os-platform/virtual-hid/linux.js +0 -5
  104. package/dist/modules/common/os-platform/virtual-hid/linux.js.map +0 -1
  105. package/dist/modules/common/os-platform/virtual-hid/mac.js +0 -119
  106. package/dist/modules/common/os-platform/virtual-hid/mac.js.map +0 -1
  107. package/dist/modules/common/os-platform/virtual-hid/windows.js +0 -5
  108. package/dist/modules/common/os-platform/virtual-hid/windows.js.map +0 -1
  109. package/dist/modules/common/ssh-config/impl.js +0 -116
  110. package/dist/modules/common/ssh-config/impl.js.map +0 -1
  111. package/dist/modules/common/ssh-config/interface.js +0 -10
  112. package/dist/modules/common/ssh-config/interface.js.map +0 -1
  113. package/dist/modules/ssh-agent/index.js +0 -8
  114. package/dist/modules/ssh-agent/index.js.map +0 -1
  115. package/dist/modules/ssh-agent/session/impl.js +0 -265
  116. package/dist/modules/ssh-agent/session/impl.js.map +0 -1
  117. package/dist/modules/ssh-agent/session/interface-rpc.js +0 -20
  118. package/dist/modules/ssh-agent/session/interface-rpc.js.map +0 -1
  119. package/dist/modules/ssh-agent/session/interface.js +0 -32
  120. package/dist/modules/ssh-agent/session/interface.js.map +0 -1
  121. package/dist/modules/ssh-agent/session/passkey-prf-page.js +0 -204
  122. package/dist/modules/ssh-agent/session/passkey-prf-page.js.map +0 -1
  123. package/dist/modules/ssh-agent/session/prf-flow.js +0 -103
  124. package/dist/modules/ssh-agent/session/prf-flow.js.map +0 -1
  125. package/dist/modules/ssh-agent/ssh-agent/impl.js +0 -117
  126. package/dist/modules/ssh-agent/ssh-agent/impl.js.map +0 -1
  127. package/dist/modules/ssh-agent/ssh-agent/interface.js +0 -2
  128. package/dist/modules/ssh-agent/ssh-agent/interface.js.map +0 -1
  129. package/dist/scripts/build.js +0 -410
  130. package/dist/scripts/build.js.map +0 -1
  131. package/dist/scripts/check-npm-version.js +0 -8
  132. package/dist/scripts/check-npm-version.js.map +0 -1
  133. package/dist/scripts/kill-existing-agent.js +0 -21
  134. package/dist/scripts/kill-existing-agent.js.map +0 -1
  135. package/dist/scripts/publish.js +0 -46
  136. package/dist/scripts/publish.js.map +0 -1
  137. package/src/commands/git/hosts.ts +0 -20
  138. package/src/commands/git/index.ts +0 -9
  139. package/src/commands/git/setup.ts +0 -182
  140. package/src/commands/index.ts +0 -15
  141. package/src/commands/npm/index.ts +0 -8
  142. package/src/commands/npm/setup/git-remote.ts +0 -78
  143. package/src/commands/npm/setup/index.ts +0 -189
  144. package/src/commands/npm/setup/npm-auth.ts +0 -58
  145. package/src/commands/npm/setup/package-json-validate.ts +0 -68
  146. package/src/commands/npm/setup/package-registry.ts +0 -24
  147. package/src/commands/npm/setup/publish-workflow.yml +0 -35
  148. package/src/commands/npm/setup/setup.test.ts +0 -117
  149. package/src/commands/npm/setup/trusted-publishing.ts +0 -106
  150. package/src/commands/npm/setup/workflow.ts +0 -20
  151. package/src/commands/ssh/get-sk-credential.ts +0 -110
  152. package/src/commands/ssh/index.ts +0 -8
  153. package/src/commands/upgrade.ts +0 -220
  154. package/src/common/command.ts +0 -16
  155. package/src/common/constants.ts +0 -26
  156. package/src/common/effective-modules-extensions.ts +0 -24
  157. package/src/common/log.ts +0 -3
  158. package/src/common/render-caller-tree.ts +0 -22
  159. package/src/entrypoints/ozy-signing-agent.ts +0 -48
  160. package/src/entrypoints/ozy-ssh-keygen.ts +0 -10
  161. package/src/entrypoints/ozy-virtual-security-key.ts +0 -21
  162. package/src/entrypoints/ozy.ts +0 -2
  163. package/src/index.ts +0 -1
  164. package/src/internal/thing.ts +0 -3
  165. package/src/modules/cli/agent-client/impl.ts +0 -152
  166. package/src/modules/cli/agent-client/interface.ts +0 -17
  167. package/src/modules/cli/git/impl.ts +0 -133
  168. package/src/modules/cli/git/interface.ts +0 -23
  169. package/src/modules/cli/git/submodule/fix.ts +0 -298
  170. package/src/modules/cli/git/submodule/git-state.ts +0 -217
  171. package/src/modules/cli/git/submodule/gitmodules.ts +0 -126
  172. package/src/modules/cli/git/submodule/printer.ts +0 -256
  173. package/src/modules/cli/git/submodule/resolve-git-dir.ts +0 -14
  174. package/src/modules/cli/github/impl.ts +0 -169
  175. package/src/modules/cli/github/interface.ts +0 -29
  176. package/src/modules/cli/index.ts +0 -16
  177. package/src/modules/common/crypto/impl.ts +0 -173
  178. package/src/modules/common/crypto/interface.ts +0 -20
  179. package/src/modules/common/index.ts +0 -19
  180. package/src/modules/common/kep-map-store/impl.ts +0 -47
  181. package/src/modules/common/kep-map-store/interface.ts +0 -9
  182. package/src/modules/common/os-platform/caller-info.ts +0 -152
  183. package/src/modules/common/os-platform/impl.ts +0 -91
  184. package/src/modules/common/os-platform/interface.ts +0 -16
  185. package/src/modules/common/os-platform/virtual-hid/index.ts +0 -12
  186. package/src/modules/common/os-platform/virtual-hid/linux.ts +0 -7
  187. package/src/modules/common/os-platform/virtual-hid/mac.ts +0 -150
  188. package/src/modules/common/os-platform/virtual-hid/windows.ts +0 -7
  189. package/src/modules/common/ssh-config/impl.ts +0 -130
  190. package/src/modules/common/ssh-config/interface.ts +0 -33
  191. package/src/modules/ssh-agent/index.ts +0 -13
  192. package/src/modules/ssh-agent/session/agent-notes.md +0 -210
  193. package/src/modules/ssh-agent/session/design.md +0 -2
  194. package/src/modules/ssh-agent/session/html-refactor.md +0 -23
  195. package/src/modules/ssh-agent/session/impl.ts +0 -328
  196. package/src/modules/ssh-agent/session/interface-rpc.ts +0 -24
  197. package/src/modules/ssh-agent/session/interface.ts +0 -62
  198. package/src/modules/ssh-agent/session/passkey-prf-page.ts +0 -224
  199. package/src/modules/ssh-agent/session/prf-flow.ts +0 -152
  200. package/src/modules/ssh-agent/ssh-agent/impl.ts +0 -136
  201. package/src/modules/ssh-agent/ssh-agent/interface.ts +0 -9
  202. package/src/scripts/build.ts +0 -504
  203. package/src/scripts/check-npm-version.ts +0 -7
  204. package/src/scripts/command-launcher.js.ejs +0 -168
  205. package/src/scripts/kill-existing-agent.ts +0 -22
  206. package/src/scripts/publish.ts +0 -47
  207. package/src/scripts/windows-bin-shims.md +0 -1104
@@ -1,410 +0,0 @@
1
- import { access, chmod, cp, mkdir, readdir, readFile, rename, rm, writeFile, } from "node:fs/promises";
2
- import { basename, dirname, relative, resolve } from "node:path";
3
- import { Schema } from "effect";
4
- import { applyEdits, modify, parse as parseJsonc, printParseErrorCode, } from "jsonc-parser";
5
- import ejs from "ejs";
6
- /**
7
- * Jive library builder.
8
- *
9
- * Source package:
10
- * src/index.ts Optional package TypeScript ESM entrypoint.
11
- * src/entrypoints/* Command entrypoints included in the generated multi-call binary.
12
- * src/agents/* Agent entrypoints, if present, included in the same multi-call binary.
13
- *
14
- * Generated base package:
15
- * package.json Stripped package manifest plus generated command launchers.
16
- * src/ Source tree for package consumers.
17
- * dist/ TypeScript-emitted library files, when a source entrypoint exists.
18
- * bin/<command> Generated JS launcher that self-repairs to the platform multi-call executable.
19
- *
20
- * Generated platform packages:
21
- * package.json Same package name with platform-specific prerelease version and os/cpu.
22
- * multi-call-binary Native Bun-compiled multi-call executable (`multi-call-binary.exe` on Windows).
23
- *
24
- * The dist folder contains only packed .tgz files. The file name is the npm dist-tag to publish:
25
- * latest.tgz for the base package and one <platform>.tgz per platform package.
26
- *
27
- * Files in the following directories will be non importable from dependents
28
- * src/entrypoints/*
29
- * src/agents/*
30
- * src/internal
31
- * So for example `import * as a from "my-package/internal"` will fail to compile
32
- */
33
- const COMMAND_SOURCE_DIRS = ["src/entrypoints", "src/agents"];
34
- const PRIVATE_SOURCE_DIRS = [...COMMAND_SOURCE_DIRS, "src/internal"];
35
- const SOURCE_ENTRYPOINT = "src/index.ts";
36
- const SOURCE_SUFFIX = ".ts";
37
- const OUTDIR = "dist";
38
- const WORKDIR = "build-temp";
39
- const MULTI_CALL_BINARY = "multi-call-binary";
40
- const WINDOWS_EXECUTABLE_SUFFIX = ".exe";
41
- const BIN_DIR = "bin";
42
- const COMMAND_LAUNCHER_TEMPLATE = "src/scripts/command-launcher.js.ejs";
43
- const TSCONFIG_INCLUDE = ["src/**/*.ts"];
44
- const TSCONFIG_EXCLUDE = [OUTDIR, "node_modules"];
45
- const JSONC_FORMATTING_OPTIONS = {
46
- insertSpaces: true,
47
- tabSize: 2,
48
- eol: "\n",
49
- insertFinalNewline: true,
50
- };
51
- const PLATFORMS = [
52
- { id: "darwin-arm64", target: "bun-darwin-arm64", os: "darwin", cpu: "arm64" },
53
- { id: "darwin-x64", target: "bun-darwin-x64", os: "darwin", cpu: "x64" },
54
- { id: "linux-arm64", target: "bun-linux-arm64", os: "linux", cpu: "arm64" },
55
- { id: "linux-x64", target: "bun-linux-x64", os: "linux", cpu: "x64" },
56
- { id: "windows-x64", target: "bun-windows-x64", os: "win32", cpu: "x64" },
57
- ];
58
- const PackageJson = Schema.Struct({
59
- name: Schema.String,
60
- version: Schema.String,
61
- description: Schema.optional(Schema.String),
62
- type: Schema.optional(Schema.Literal("module")),
63
- license: Schema.optional(Schema.String),
64
- author: Schema.optional(Schema.Unknown),
65
- contributors: Schema.optional(Schema.Unknown),
66
- keywords: Schema.optional(Schema.Unknown),
67
- homepage: Schema.optional(Schema.String),
68
- bugs: Schema.optional(Schema.Unknown),
69
- funding: Schema.optional(Schema.Unknown),
70
- repository: Schema.optional(Schema.Unknown),
71
- publishConfig: Schema.optional(Schema.Unknown),
72
- dependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
73
- });
74
- class TscFailed extends Error {
75
- exitCode;
76
- constructor(exitCode) {
77
- super(`tsc failed with exit code ${exitCode}`);
78
- this.exitCode = exitCode;
79
- }
80
- }
81
- const rootDir = process.cwd();
82
- const outDir = resolve(rootDir, OUTDIR);
83
- const workDir = resolve(outDir, WORKDIR);
84
- const multiCallEntrypointPath = resolve(workDir, "multi-call.ts");
85
- const packageJson = await readPackageJson();
86
- const commandSources = await collectCommandSources();
87
- const sourceEntrypoint = resolve(rootDir, SOURCE_ENTRYPOINT);
88
- const hasSourceEntrypoint = await pathExists(sourceEntrypoint);
89
- const hasCommandSources = commandSources.length > 0;
90
- await rm(outDir, { recursive: true, force: true });
91
- await mkdir(outDir, { recursive: true });
92
- await mkdir(workDir, { recursive: true });
93
- try {
94
- if (hasCommandSources) {
95
- await writeFile(multiCallEntrypointPath, generateMultiCallEntrypoint(multiCallEntrypointPath));
96
- }
97
- await buildBasePackage();
98
- if (hasCommandSources) {
99
- await Promise.all(PLATFORMS.map(buildPlatformPackage));
100
- }
101
- }
102
- catch (error) {
103
- if (error instanceof TscFailed) {
104
- process.exitCode = error.exitCode;
105
- }
106
- else {
107
- throw error;
108
- }
109
- }
110
- finally {
111
- await rm(workDir, { recursive: true, force: true });
112
- }
113
- async function readPackageJson() {
114
- const parsed = JSON.parse(await readFile(resolve(rootDir, "package.json"), "utf-8"));
115
- return Schema.decodeUnknownSync(PackageJson)(parsed);
116
- }
117
- async function collectCommandSources() {
118
- const commands = new Map();
119
- for (const sourceDir of COMMAND_SOURCE_DIRS) {
120
- const absoluteSourceDir = resolve(rootDir, sourceDir);
121
- if (!(await pathExists(absoluteSourceDir)))
122
- continue;
123
- for (const child of (await readdir(absoluteSourceDir)).sort()) {
124
- if (!child.endsWith(SOURCE_SUFFIX))
125
- continue;
126
- const command = basename(child, SOURCE_SUFFIX);
127
- const sourcePath = resolve(absoluteSourceDir, child);
128
- const existing = commands.get(command);
129
- if (existing) {
130
- throw new Error(`Duplicate command "${command}" in ${existing.sourcePath} and ${sourcePath}`);
131
- }
132
- commands.set(command, { command, sourcePath });
133
- }
134
- }
135
- return [...commands.values()].sort((a, b) => a.command.localeCompare(b.command));
136
- }
137
- async function buildBasePackage() {
138
- const packageDir = resolve(workDir, "base-package");
139
- await mkdir(packageDir, { recursive: true });
140
- if (hasSourceEntrypoint) {
141
- await transpileLibrarySource(packageDir);
142
- }
143
- await cp(resolve(rootDir, "src"), resolve(packageDir, "src"), { recursive: true });
144
- if (hasCommandSources) {
145
- await writeCommandLaunchers(packageDir);
146
- }
147
- await writePackageJson(packageDir, generateBasePackageJson());
148
- await packPackage(packageDir, "latest");
149
- }
150
- async function buildPlatformPackage(platform) {
151
- const packageDir = resolve(workDir, platform.id);
152
- await mkdir(packageDir, { recursive: true });
153
- const binaryPath = resolve(packageDir, platformBinaryFile(platform));
154
- const buildResult = await Bun.build({
155
- entrypoints: [multiCallEntrypointPath],
156
- compile: {
157
- outfile: binaryPath,
158
- target: platform.target,
159
- },
160
- sourcemap: "inline",
161
- });
162
- assertBuildSucceeded(buildResult, `compile ${platform.id} multi-call binary`);
163
- await chmod(binaryPath, 0o755);
164
- await writePackageJson(packageDir, generatePlatformPackageJson(platform));
165
- await packPackage(packageDir, platform.id);
166
- }
167
- async function writeCommandLaunchers(packageDir) {
168
- const binDir = resolve(packageDir, BIN_DIR);
169
- await mkdir(binDir, { recursive: true });
170
- const launcher = await renderCommandLauncher();
171
- await Promise.all(commandSources.map(({ command }) => writeFile(resolve(binDir, command), launcher, { mode: 0o755 })));
172
- }
173
- function assertBuildSucceeded(result, label) {
174
- if (result.success)
175
- return;
176
- for (const log of result.logs) {
177
- console.error(log);
178
- }
179
- throw new Error(`Failed to ${label}`);
180
- }
181
- async function writePackageJson(packageDir, value) {
182
- await writeFile(resolve(packageDir, "package.json"), `${JSON.stringify(value, null, 2)}\n`);
183
- }
184
- async function transpileLibrarySource(packageDir) {
185
- const rootTsconfigPath = resolve(rootDir, "tsconfig.json");
186
- await ensureTsconfigSourceBoundary(rootTsconfigPath);
187
- const tscPath = resolve(rootDir, "node_modules", ".bin", process.platform === "win32" ? "tsc.cmd" : "tsc");
188
- // TODO: tool should just come bundled with typescript.
189
- if (!(await pathExists(tscPath))) {
190
- throw new Error("TypeScript is required to emit library source. Install typescript as a devDependency.");
191
- }
192
- const exitCode = await Bun.spawn([
193
- tscPath,
194
- "--project",
195
- rootTsconfigPath,
196
- "--rootDir",
197
- resolve(rootDir, "src"),
198
- "--outDir",
199
- resolve(packageDir, "dist"),
200
- "--pretty",
201
- "true",
202
- "--noEmit",
203
- "false",
204
- "--declaration",
205
- "false",
206
- "--declarationMap",
207
- "false",
208
- "--sourceMap",
209
- "--rewriteRelativeImportExtensions",
210
- ], {
211
- stdin: "inherit",
212
- stdout: "inherit",
213
- stderr: "inherit",
214
- }).exited;
215
- if (exitCode !== 0) {
216
- throw new TscFailed(exitCode);
217
- }
218
- }
219
- async function ensureTsconfigSourceBoundary(tsconfigPath) {
220
- const originalText = await readFile(tsconfigPath, "utf-8");
221
- assertValidJsonc(tsconfigPath, originalText);
222
- const withInclude = applyEdits(originalText, modify(originalText, ["include"], TSCONFIG_INCLUDE, {
223
- formattingOptions: JSONC_FORMATTING_OPTIONS,
224
- getInsertionIndex: (properties) => insertAfter(properties, "compilerOptions"),
225
- }));
226
- const withExclude = applyEdits(withInclude, modify(withInclude, ["exclude"], TSCONFIG_EXCLUDE, {
227
- formattingOptions: JSONC_FORMATTING_OPTIONS,
228
- getInsertionIndex: (properties) => insertAfter(properties, "include"),
229
- }));
230
- assertValidJsonc(tsconfigPath, withExclude);
231
- if (withExclude !== originalText) {
232
- await writeFile(tsconfigPath, withExclude);
233
- }
234
- }
235
- function assertValidJsonc(filePath, text) {
236
- const errors = [];
237
- parseJsonc(text, errors, { allowTrailingComma: true });
238
- if (errors.length === 0)
239
- return;
240
- const details = errors
241
- .map((error) => `${printParseErrorCode(error.error)} at offset ${error.offset}`)
242
- .join(", ");
243
- throw new Error(`${filePath} is invalid JSONC: ${details}`);
244
- }
245
- function insertAfter(properties, property) {
246
- const index = properties.indexOf(property);
247
- return index === -1 ? properties.length : index + 1;
248
- }
249
- function generateBasePackageJson() {
250
- const generated = {};
251
- for (const key of [
252
- "name",
253
- "version",
254
- "description",
255
- "type",
256
- "license",
257
- "author",
258
- "contributors",
259
- "keywords",
260
- "homepage",
261
- "bugs",
262
- "funding",
263
- "repository",
264
- "publishConfig",
265
- ]) {
266
- const value = packageJson[key];
267
- if (value !== undefined)
268
- generated[key] = value;
269
- }
270
- generated["type"] = packageJson["type"] ?? "module";
271
- if (hasSourceEntrypoint) {
272
- generated["main"] = "./dist/index.js";
273
- generated["module"] = "./dist/index.js";
274
- generated["types"] = "./src/index.ts";
275
- generated["exports"] = {
276
- ".": {
277
- types: "./src/index.ts",
278
- import: "./dist/index.js",
279
- },
280
- ...Object.fromEntries(PRIVATE_SOURCE_DIRS.flatMap((sourceDir) => {
281
- const subpath = sourceDir.replace(/^src\//, "");
282
- return [
283
- [`./${subpath}`, null],
284
- [`./${subpath}/*`, null],
285
- ];
286
- })),
287
- "./*": {
288
- types: "./src/*.ts",
289
- import: "./dist/*.js",
290
- },
291
- };
292
- }
293
- const files = hasSourceEntrypoint ? ["dist", "src"] : [];
294
- if (hasCommandSources)
295
- files.push(BIN_DIR);
296
- if (files.length > 0)
297
- generated["files"] = files;
298
- if (hasCommandSources) {
299
- generated["bin"] = generateBaseBinEntries();
300
- }
301
- if (packageJson["dependencies"])
302
- generated["dependencies"] = packageJson["dependencies"];
303
- if (hasCommandSources) {
304
- generated["optionalDependencies"] = Object.fromEntries(PLATFORMS.map((platform) => [
305
- platformAliasName(platform),
306
- `npm:${packageJson.name}@${platformVersion(platform)}`,
307
- ]));
308
- }
309
- return generated;
310
- }
311
- function generatePlatformPackageJson(platform) {
312
- const generated = {
313
- name: packageJson.name,
314
- version: platformVersion(platform),
315
- type: packageJson.type ?? "module",
316
- os: [platform.os],
317
- cpu: [platform.cpu],
318
- files: [platformBinaryFile(platform)],
319
- };
320
- for (const key of ["description", "license", "repository", "publishConfig"]) {
321
- const value = packageJson[key];
322
- if (value !== undefined)
323
- generated[key] = value;
324
- }
325
- return generated;
326
- }
327
- function platformVersion(platform) {
328
- return `${packageJson.version}-${platform.id}.0`;
329
- }
330
- function platformAliasName(platform) {
331
- return `${packageJson.name}-${platform.id}`;
332
- }
333
- function platformBinaryFile(platform) {
334
- return platform.os === "win32" ? `${MULTI_CALL_BINARY}${WINDOWS_EXECUTABLE_SUFFIX}` : MULTI_CALL_BINARY;
335
- }
336
- function generateBaseBinEntries() {
337
- return Object.fromEntries(commandSources.map(({ command }) => [command, `./${BIN_DIR}/${command}`]));
338
- }
339
- async function packPackage(packageDir, tag) {
340
- const npmCacheDir = resolve(workDir, "npm-cache");
341
- const output = await Bun.$ `npm pack ${packageDir} --pack-destination ${outDir} --ignore-scripts --cache ${npmCacheDir} --loglevel error`.text();
342
- const generatedFile = output.trim().split("\n").at(-1);
343
- if (!generatedFile)
344
- throw new Error(`npm pack did not report an output file for ${packageDir}`);
345
- const sourcePath = resolve(outDir, generatedFile);
346
- const taggedPath = resolve(outDir, `${tag}.tgz`);
347
- await rm(taggedPath, { force: true });
348
- await rename(sourcePath, taggedPath);
349
- console.log(`${packageDir} -> ${relative(rootDir, taggedPath)}`);
350
- }
351
- function generateMultiCallEntrypoint(dispatcherPath) {
352
- const dispatcherDir = dirname(dispatcherPath);
353
- const loaders = commandSources
354
- .map(({ command, sourcePath }) => {
355
- const importPath = toImportPath(relative(dispatcherDir, sourcePath));
356
- return ` ${JSON.stringify(command)}: () => import(${JSON.stringify(importPath)}),`;
357
- })
358
- .join("\n");
359
- return `import { basename } from "node:path";
360
- // console.log("multi-call argv", JSON.stringify({ argv0: process.argv0, argv: process.argv }));
361
- const commandLoaders: Record<string, () => Promise<unknown>> = {
362
- ${loaders}
363
- };
364
-
365
- const invokedPath = process.argv0 || process.argv[1] || "";
366
- const command = basename(invokedPath).replace(/\\.(?:exe|cmd|ps1)$/i, "");
367
- const loadCommand = commandLoaders[command];
368
-
369
- if (!loadCommand) {
370
- console.error(\`Unknown ${packageJson.name} command "\${command}". Expected one of: \${Object.keys(commandLoaders).sort().join(", ")}\`);
371
- process.exit(1);
372
- }
373
-
374
- await loadCommand();
375
- `;
376
- }
377
- async function renderCommandLauncher() {
378
- const platformMap = Object.fromEntries(PLATFORMS.map((platform) => [`${platform.os}-${platform.cpu}`, platform.id]));
379
- const platformPackages = Object.fromEntries(PLATFORMS.map((platform) => [platform.id, platformAliasName(platform)]));
380
- const platformBinaries = Object.fromEntries(PLATFORMS.map((platform) => [platform.id, platformBinaryFile(platform)]));
381
- const commandNames = commandSources.map(({ command }) => command);
382
- const template = await readFile(resolve(rootDir, COMMAND_LAUNCHER_TEMPLATE), "utf-8");
383
- return ejs.render(template, {
384
- commandNames,
385
- json: (value) => JSON.stringify(value, null, 2),
386
- platformBinaries,
387
- platformMap,
388
- platformPackages,
389
- windowsExecutableSuffix: WINDOWS_EXECUTABLE_SUFFIX,
390
- }, { async: false });
391
- }
392
- function toImportPath(path) {
393
- const normalized = toPosixPath(path);
394
- if (normalized.startsWith(".") || normalized.startsWith("/"))
395
- return normalized;
396
- return `./${normalized}`;
397
- }
398
- function toPosixPath(path) {
399
- return path.split("\\").join("/");
400
- }
401
- async function pathExists(path) {
402
- try {
403
- await access(path);
404
- return true;
405
- }
406
- catch {
407
- return false;
408
- }
409
- }
410
- //# sourceMappingURL=build.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../src/scripts/build.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,KAAK,EACL,EAAE,EACF,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,EAAE,EACF,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,UAAU,EACV,MAAM,EACN,KAAK,IAAI,UAAU,EACnB,mBAAmB,GAGpB,MAAM,cAAc,CAAC;AACtB,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,mBAAmB,GAAG,CAAC,iBAAiB,EAAE,YAAY,CAAU,CAAC;AACvE,MAAM,mBAAmB,GAAG,CAAC,GAAG,mBAAmB,EAAE,cAAc,CAAU,CAAC;AAC9E,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,aAAa,GAAG,KAAK,CAAC;AAC5B,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,yBAAyB,GAAG,MAAM,CAAC;AACzC,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,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AC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,8 +0,0 @@
1
- const { name, version } = await Bun.file("package.json").json();
2
- const res = await fetch(`https://registry.npmjs.org/${name}/${version}`);
3
- if (res.status === 200) {
4
- console.error(`✗ ${name}@${version} is already published on npm`);
5
- process.exit(1);
6
- }
7
- export {};
8
- //# sourceMappingURL=check-npm-version.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-npm-version.js","sourceRoot":"","sources":["../../../../../src/scripts/check-npm-version.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;AAEhE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,8BAA8B,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;AACzE,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;IACvB,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,OAAO,8BAA8B,CAAC,CAAC;IAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -1,21 +0,0 @@
1
- import path from "node:path";
2
- import { existsSync, readFileSync } from "node:fs";
3
- const pidFile = path.resolve(import.meta.dir, "../../dist/ozy-signing-agent.pid");
4
- function isProcessRunning(pid) {
5
- try {
6
- // signal 0 sends nothing; it only checks whether the PID exists
7
- process.kill(pid, 0);
8
- return true;
9
- }
10
- catch {
11
- return false;
12
- }
13
- }
14
- if (existsSync(pidFile)) {
15
- const pid = parseInt(readFileSync(pidFile, "utf-8"));
16
- if (isProcessRunning(pid)) {
17
- console.log(`Killing agent on PID ${pid}`);
18
- process.kill(pid, "SIGTERM");
19
- }
20
- }
21
- //# sourceMappingURL=kill-existing-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kill-existing-agent.js","sourceRoot":"","sources":["../../../../../src/scripts/kill-existing-agent.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,kCAAkC,CAAC,CAAC;AAElF,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,CAAC;QACH,gEAAgE;QAChE,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -1,46 +0,0 @@
1
- import * as path from "path";
2
- import * as fs from "fs/promises";
3
- // only publish on workflow dispatch on push to default branch (config can change this later)
4
- const event = process.argv[2];
5
- if (event !== "push") {
6
- console.log("Skipping publish. Only publishing to NPM on push events. Current event is", event);
7
- process.exit(0);
8
- }
9
- const buildFolderName = "dist";
10
- const expectedFileType = ".tgz";
11
- const distFolder = path.resolve(__dirname, `../../${buildFolderName}`);
12
- const children = await fs.readdir(distFolder);
13
- const badChildren = new Set();
14
- for (const child of children) {
15
- if (!child.endsWith(expectedFileType)) {
16
- badChildren.add(child);
17
- }
18
- }
19
- if (badChildren.size > 0) {
20
- console.log(`Only expected ${expectedFileType} files in ${buildFolderName} folder. Instead got following:`);
21
- for (const child of children) {
22
- const isBad = badChildren.has(child);
23
- const prefix = isBad ? "::error::" : "";
24
- const suffix = isBad ? "" : "";
25
- console.log(`${prefix}- ${child}${suffix}`);
26
- }
27
- process.exit(1);
28
- }
29
- for (const child of children) {
30
- const fullPath = path.resolve(distFolder, child).toLocaleLowerCase();
31
- const tarball = `./${buildFolderName}/${child}`;
32
- const tag = path.basename(fullPath, expectedFileType);
33
- // 11.5.1 is when OIDC / trusted publishing were added
34
- const command = ["bunx", "npm@^11.5.1", "publish", tarball, "--tag", tag, "--loglevel", "silly"];
35
- console.log(command.join(" "));
36
- const exitCode = await Bun.spawn(command, {
37
- stdin: "inherit",
38
- stdout: "inherit",
39
- stderr: "inherit",
40
- env: process.env
41
- }).exited;
42
- if (exitCode !== 0) {
43
- process.exit(exitCode);
44
- }
45
- }
46
- //# sourceMappingURL=publish.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../../src/scripts/publish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAElC,6FAA6F;AAC7F,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9B,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,2EAA2E,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC,CAAC;AACvE,MAA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Aa,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IACjG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE;QACxC,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB,CAAC,CAAC,MAAM,CAAC;IACV,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;AACH,CAAC"}
@@ -1,20 +0,0 @@
1
- import { Effect } from "effect";
2
- import { makeCommand } from "@/common/command";
3
- import { log } from "@/common/log";
4
- import { commonModules } from "@/modules/common";
5
- import { SSHConfigImpl } from "@/modules/common/ssh-config/impl";
6
-
7
- export const hosts = makeCommand('hosts', 'show all configured github.com SSH hosts', () =>
8
- Effect.gen(function* () {
9
- const sshConfig = yield* commonModules.SSHConfig;
10
- const config = yield* sshConfig.getSSHConfig();
11
- const gitHosts: string[] = [];
12
- for (const host in config) {
13
- if (config[host]!.HostName === 'github.com') {
14
- gitHosts.push(host);
15
- }
16
- }
17
- log('Available hosts:');
18
- gitHosts.forEach(host => { log(` - ${host}`); });
19
- }).pipe(Effect.provide(SSHConfigImpl.Layer))
20
- );
@@ -1,9 +0,0 @@
1
- import { Command } from 'commander';
2
- import { setup } from './setup';
3
- import { hosts } from './hosts';
4
-
5
- export const git = new Command('git')
6
- .summary('setup git in repo for verified commits');
7
-
8
- [setup, hosts]
9
- .forEach(cmd => { git.addCommand(cmd) });