@offckb/cli 0.2.0-canary-3cf08e5.0 → 0.2.0-canary-e88ff6c.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.
- package/dist/cfg/const.d.ts +0 -1
- package/dist/cfg/const.js +1 -2
- package/dist/util/template.d.ts +1 -1
- package/dist/util/template.js +4 -20
- package/package.json +3 -2
- package/templates/template.json +16 -0
package/dist/cfg/const.d.ts
CHANGED
|
@@ -18,4 +18,3 @@ export declare const dappTemplateGitRepoUserAndName = "RetricSu/offckb";
|
|
|
18
18
|
export declare const dappTemplateGitUrl = "https://github.com/RetricSu/offckb";
|
|
19
19
|
export declare const dappTemplateGitBranch = "develop";
|
|
20
20
|
export declare const dappTemplateGitFolder = "templates";
|
|
21
|
-
export declare const bareTemplateGitSelectOptionFile = "template.json";
|
package/dist/cfg/const.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.dappTemplateGitFolder = exports.dappTemplateGitBranch = exports.dappTemplateGitUrl = exports.dappTemplateGitRepoUserAndName = exports.defaultLumosVersion = exports.minimalRequiredCKBVersion = exports.accountTargetDir = exports.deployedContractInfoFolderPath = exports.ckbBinPath = exports.ckbFolderPath = exports.devnetDataPath = exports.devnetPath = exports.devnetSourcePath = exports.userOffCKBConfigPath = exports.predefinedOffCKBConfigTsPath = exports.targetEnvironmentPath = exports.dappTemplatePath = exports.packageRootPath = exports.packageSrcPath = exports.currentExecPath = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
// todo: move some to user settings
|
|
29
29
|
// path
|
|
@@ -49,4 +49,3 @@ exports.dappTemplateGitRepoUserAndName = 'RetricSu/offckb';
|
|
|
49
49
|
exports.dappTemplateGitUrl = `https://github.com/${exports.dappTemplateGitRepoUserAndName}`;
|
|
50
50
|
exports.dappTemplateGitBranch = 'develop';
|
|
51
51
|
exports.dappTemplateGitFolder = 'templates';
|
|
52
|
-
exports.bareTemplateGitSelectOptionFile = 'template.json';
|
package/dist/util/template.d.ts
CHANGED
package/dist/util/template.js
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
4
|
};
|
|
11
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
6
|
exports.loadBareTemplateOpts = void 0;
|
|
13
|
-
const
|
|
14
|
-
const request_1 = require("./request");
|
|
7
|
+
const template_json_1 = __importDefault(require("../../templates/template.json"));
|
|
15
8
|
function loadBareTemplateOpts() {
|
|
16
|
-
return
|
|
17
|
-
const githubUrl = `https://raw.githubusercontent.com/${const_1.dappTemplateGitRepoUserAndName}/${const_1.dappTemplateGitBranch}/${const_1.dappTemplateGitFolder}/${const_1.bareTemplateGitSelectOptionFile}`;
|
|
18
|
-
try {
|
|
19
|
-
const response = yield request_1.Request.get(githubUrl);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
throw new Error(`Error fetching JSON: ${error.message}`);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
9
|
+
return template_json_1.default;
|
|
26
10
|
}
|
|
27
11
|
exports.loadBareTemplateOpts = loadBareTemplateOpts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@offckb/cli",
|
|
3
|
-
"version": "0.2.0-canary-
|
|
3
|
+
"version": "0.2.0-canary-e88ff6c.0",
|
|
4
4
|
"description": "ckb development network for your first try",
|
|
5
5
|
"author": "Retric Su <retric@cryptape.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"account",
|
|
18
18
|
"ckb",
|
|
19
19
|
"templates/config.json",
|
|
20
|
-
"templates/offckb.config.ts"
|
|
20
|
+
"templates/offckb.config.ts",
|
|
21
|
+
"templates/template.json"
|
|
21
22
|
],
|
|
22
23
|
"private": false,
|
|
23
24
|
"publishConfig": {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "Remix-Vite Bare Templates",
|
|
4
|
+
"value": "remix-vite-template",
|
|
5
|
+
"description": "A full-stack template with Remix-vite and ckb-script-templates",
|
|
6
|
+
"tag": ["remix", "vite", "tailwindcss", "ckb-script-templates", "typescript", "rust"],
|
|
7
|
+
"author": "retric@cryptape.com"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "Next.js Bare Templates",
|
|
11
|
+
"value": "next-js-template",
|
|
12
|
+
"description": "A full-stack template with Next.js framework and ckb-script-templates",
|
|
13
|
+
"tag": ["next.js", "tailwindcss", "ckb-script-templates", "typescript", "rust"],
|
|
14
|
+
"author": "retric@cryptape.com"
|
|
15
|
+
}
|
|
16
|
+
]
|