create-fhevm-example 1.4.0 → 1.4.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../scripts/shared/generators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../scripts/shared/generators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAuDvD;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAkCjE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,MAAM,CA2BR;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,IAAI,CAiBN;AAMD;;GAEG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA2B/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAchE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA4B1D"}
|
|
@@ -93,6 +93,11 @@ function cleanupTemplate(outputDir) {
|
|
|
93
93
|
fs.unlinkSync(oldTaskFile);
|
|
94
94
|
}
|
|
95
95
|
fs.writeFileSync(path.join(outputDir, "test", "types.ts"), utils_1.TEST_TYPES_CONTENT);
|
|
96
|
+
// Create .gitignore (npm ignores .gitignore files during publish)
|
|
97
|
+
const gitignorePath = path.join(outputDir, ".gitignore");
|
|
98
|
+
if (!fs.existsSync(gitignorePath)) {
|
|
99
|
+
fs.writeFileSync(gitignorePath, utils_1.GITIGNORE_CONTENT);
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
// =============================================================================
|
|
98
103
|
// Code Generators
|
|
@@ -12,6 +12,8 @@ export declare const TEMPLATE_DIR_NAME = "fhevm-hardhat-template";
|
|
|
12
12
|
export declare const MAX_DESCRIPTION_LENGTH = 80;
|
|
13
13
|
/** Directories to exclude when copying template */
|
|
14
14
|
export declare const EXCLUDE_DIRS: string[];
|
|
15
|
+
/** Gitignore content for scaffolded projects (npm ignores .gitignore during publish) */
|
|
16
|
+
export declare const GITIGNORE_CONTENT = "# fhevm\nfhevmTemp\n\n# directories\n.coverage_artifacts\n.coverage_cache\n.coverage_contracts\nartifacts\nbuild\ncache\ncoverage\ndist\nnode_modules\ntypes\ndeployments\ntmp\n\n# files\n*.env\n*.log\n.DS_Store\n.pnp.*\ncoverage.json\npnpm-lock.yaml\nyarn.lock\n";
|
|
15
17
|
/** FHEVM package versions for --add mode */
|
|
16
18
|
export declare const FHEVM_DEPENDENCIES: {
|
|
17
19
|
dependencies: {
|
|
@@ -46,7 +48,7 @@ export declare const log: {
|
|
|
46
48
|
* Standardized error handler for CLI - logs error and exits
|
|
47
49
|
*/
|
|
48
50
|
export declare function handleError(error: unknown, exitCode?: number): never;
|
|
49
|
-
/** Resolves root directory
|
|
51
|
+
/** Resolves root directory by finding package.json */
|
|
50
52
|
export declare function getRootDir(): string;
|
|
51
53
|
/** Resolves template directory path */
|
|
52
54
|
export declare function getTemplateDir(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../scripts/shared/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,eAAO,MAAM,aAAa,iBAAO,CAAC;AAElC,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAE1D,gDAAgD;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,mDAAmD;AACnD,eAAO,MAAM,YAAY,UAQxB,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,kBAAkB;;;;;;;;;CAS9B,CAAC;AAEF,eAAO,MAAM,cAAc,UAQ1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,yPAS9B,CAAC;AAEF,eAAO,MAAM,cAAc;;;4BAGD,MAAM;6BACL,MAAM;uBACZ,MAAM;;;;CAI1B,CAAC;AAMF,eAAO,MAAM,GAAG;mBACC,MAAM;iBACR,MAAM;gBACP,MAAM;eACP,MAAM;mBACF,MAAM;CACtB,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAI,GAAG,KAAK,CAI/D;AAMD,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../scripts/shared/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,eAAO,MAAM,aAAa,iBAAO,CAAC;AAElC,qDAAqD;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AAE,MAAM,GAAG,IAAI,CAIlD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAInD;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhE"}
|
|
@@ -42,7 +42,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
42
42
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.log = exports.ERROR_MESSAGES = exports.TEST_TYPES_CONTENT = exports.CATEGORY_ORDER = exports.FHEVM_DEPENDENCIES = exports.EXCLUDE_DIRS = exports.MAX_DESCRIPTION_LENGTH = exports.TEMPLATE_DIR_NAME = exports.CATEGORY_ICON = void 0;
|
|
45
|
+
exports.log = exports.ERROR_MESSAGES = exports.TEST_TYPES_CONTENT = exports.CATEGORY_ORDER = exports.FHEVM_DEPENDENCIES = exports.GITIGNORE_CONTENT = exports.EXCLUDE_DIRS = exports.MAX_DESCRIPTION_LENGTH = exports.TEMPLATE_DIR_NAME = exports.CATEGORY_ICON = void 0;
|
|
46
46
|
exports.handleError = handleError;
|
|
47
47
|
exports.getRootDir = getRootDir;
|
|
48
48
|
exports.getTemplateDir = getTemplateDir;
|
|
@@ -74,6 +74,33 @@ exports.EXCLUDE_DIRS = [
|
|
|
74
74
|
"dist",
|
|
75
75
|
".git",
|
|
76
76
|
];
|
|
77
|
+
/** Gitignore content for scaffolded projects (npm ignores .gitignore during publish) */
|
|
78
|
+
exports.GITIGNORE_CONTENT = `# fhevm
|
|
79
|
+
fhevmTemp
|
|
80
|
+
|
|
81
|
+
# directories
|
|
82
|
+
.coverage_artifacts
|
|
83
|
+
.coverage_cache
|
|
84
|
+
.coverage_contracts
|
|
85
|
+
artifacts
|
|
86
|
+
build
|
|
87
|
+
cache
|
|
88
|
+
coverage
|
|
89
|
+
dist
|
|
90
|
+
node_modules
|
|
91
|
+
types
|
|
92
|
+
deployments
|
|
93
|
+
tmp
|
|
94
|
+
|
|
95
|
+
# files
|
|
96
|
+
*.env
|
|
97
|
+
*.log
|
|
98
|
+
.DS_Store
|
|
99
|
+
.pnp.*
|
|
100
|
+
coverage.json
|
|
101
|
+
pnpm-lock.yaml
|
|
102
|
+
yarn.lock
|
|
103
|
+
`;
|
|
77
104
|
/** FHEVM package versions for --add mode */
|
|
78
105
|
exports.FHEVM_DEPENDENCIES = {
|
|
79
106
|
dependencies: {
|
|
@@ -135,8 +162,16 @@ function handleError(error, exitCode = 1) {
|
|
|
135
162
|
// =============================================================================
|
|
136
163
|
// File System Utilities
|
|
137
164
|
// =============================================================================
|
|
138
|
-
/** Resolves root directory
|
|
165
|
+
/** Resolves root directory by finding package.json */
|
|
139
166
|
function getRootDir() {
|
|
167
|
+
let dir = __dirname;
|
|
168
|
+
while (dir !== path.dirname(dir)) {
|
|
169
|
+
if (fs.existsSync(path.join(dir, "package.json"))) {
|
|
170
|
+
return dir;
|
|
171
|
+
}
|
|
172
|
+
dir = path.dirname(dir);
|
|
173
|
+
}
|
|
174
|
+
// Fallback
|
|
140
175
|
return path.resolve(__dirname, "../..");
|
|
141
176
|
}
|
|
142
177
|
/** Resolves template directory path */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fhevm-example",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Create FHEVM example projects with a single command - A comprehensive toolkit for building privacy-preserving smart contracts",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-fhevm-example": "./dist/scripts/index.js"
|