poe-code 0.1.26 → 1.0.1
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
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FileSystem } from "../utils/file-system.js";
|
|
2
|
-
export interface PreparePlaceholderPackageOptions {
|
|
3
|
-
fs: FileSystem;
|
|
4
|
-
targetDir: string;
|
|
5
|
-
packageName: string;
|
|
6
|
-
version?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function preparePlaceholderPackage(options: PreparePlaceholderPackageOptions): Promise<void>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
const DEFAULT_VERSION = "0.0.0-placeholder";
|
|
3
|
-
export async function preparePlaceholderPackage(options) {
|
|
4
|
-
const { fs, targetDir, packageName, version = DEFAULT_VERSION } = options;
|
|
5
|
-
await fs.mkdir(targetDir, { recursive: true });
|
|
6
|
-
const manifestPath = path.join(targetDir, "package.json");
|
|
7
|
-
const manifest = JSON.stringify(createManifest(packageName, version), null, 2);
|
|
8
|
-
await fs.writeFile(manifestPath, `${manifest}\n`, { encoding: "utf8" });
|
|
9
|
-
const entryPath = path.join(targetDir, "index.js");
|
|
10
|
-
await fs.writeFile(entryPath, createEntryPoint(packageName), {
|
|
11
|
-
encoding: "utf8"
|
|
12
|
-
});
|
|
13
|
-
const readmePath = path.join(targetDir, "README.md");
|
|
14
|
-
await fs.writeFile(readmePath, createReadme(packageName), {
|
|
15
|
-
encoding: "utf8"
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function createManifest(packageName, version) {
|
|
19
|
-
return {
|
|
20
|
-
name: packageName,
|
|
21
|
-
version,
|
|
22
|
-
description: `Placeholder release for ${packageName} to reserve the package name.`,
|
|
23
|
-
bin: {
|
|
24
|
-
[packageName]: "index.js"
|
|
25
|
-
},
|
|
26
|
-
files: ["index.js", "README.md"],
|
|
27
|
-
keywords: ["placeholder"],
|
|
28
|
-
license: "MIT"
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function createEntryPoint(packageName) {
|
|
32
|
-
const message = `Placeholder release for ${packageName}. Full CLI coming soon.`;
|
|
33
|
-
return [
|
|
34
|
-
"#!/usr/bin/env node",
|
|
35
|
-
`'use strict';`,
|
|
36
|
-
"",
|
|
37
|
-
`console.log("${message}");`,
|
|
38
|
-
""
|
|
39
|
-
].join("\n");
|
|
40
|
-
}
|
|
41
|
-
function createReadme(packageName) {
|
|
42
|
-
return [
|
|
43
|
-
`# ${packageName}`,
|
|
44
|
-
"",
|
|
45
|
-
`This is a placeholder release published to reserve the \`${packageName}\` package name.`,
|
|
46
|
-
"",
|
|
47
|
-
"The full CLI will be published once it is ready. Stay tuned!"
|
|
48
|
-
].join("\n");
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=publish-placeholder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish-placeholder.js","sourceRoot":"","sources":["../../src/commands/publish-placeholder.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,OAAyC;IAEzC,MAAM,EACJ,EAAE,EACF,SAAS,EACT,WAAW,EACX,OAAO,GAAG,eAAe,EAC1B,GAAG,OAAO,CAAC;IAEZ,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAC7B,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,EACpC,IAAI,EACJ,CAAC,CACF,CAAC;IACF,MAAM,EAAE,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