uc-dev 1.0.0-beta.4 → 1.0.0-beta.5
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/out/cli.js +47 -23
- package/package.json +1 -1
package/out/cli.js
CHANGED
|
@@ -715,7 +715,7 @@ var ucUtil = class _ucUtil {
|
|
|
715
715
|
};
|
|
716
716
|
|
|
717
717
|
// src/utils/cliMain.ts
|
|
718
|
-
import { existsSync as existsSync11, readFileSync as
|
|
718
|
+
import { existsSync as existsSync11, readFileSync as readFileSync7 } from "fs";
|
|
719
719
|
import path6, { join as join15 } from "path";
|
|
720
720
|
|
|
721
721
|
// src/utils/cliDependancyChecker.ts
|
|
@@ -1615,9 +1615,6 @@ function _runTemplate(rel, options) {
|
|
|
1615
1615
|
import path5 from "path";
|
|
1616
1616
|
import url3 from "url";
|
|
1617
1617
|
|
|
1618
|
-
// src/lib/processes/BuildDesigner.ts
|
|
1619
|
-
import { join as join6, normalize as normalize5, relative as relative2, resolve as resolve6 } from "path";
|
|
1620
|
-
|
|
1621
1618
|
// ../ap-shared-core/out/uc-runtime/stylerRegs.js
|
|
1622
1619
|
function ScssExtractor(csscontent) {
|
|
1623
1620
|
let ocHandler = new openCloser();
|
|
@@ -1805,8 +1802,13 @@ function splitCSSById(cssContent, rtrn) {
|
|
|
1805
1802
|
rtrn.outerCssContents = outerRulesCSS;
|
|
1806
1803
|
}
|
|
1807
1804
|
|
|
1805
|
+
// src/lib/processes/BuildDesigner.ts
|
|
1806
|
+
import { existsSync as existsSync9, readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "fs";
|
|
1807
|
+
import { join as join6, normalize as normalize5, relative as relative2, resolve as resolve6 } from "path";
|
|
1808
|
+
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
1809
|
+
|
|
1808
1810
|
// src/lib/processes/commonGeneratorX.ts
|
|
1809
|
-
import { existsSync as existsSync8, readFileSync as readFileSync4, writeFileSync as
|
|
1811
|
+
import { existsSync as existsSync8, readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
|
|
1810
1812
|
import { dirname as dirname5, join as join5, normalize as normalize4, resolve as resolve5 } from "path";
|
|
1811
1813
|
|
|
1812
1814
|
// src/lib/processes/ResourceBuildEngine.ts
|
|
@@ -2140,14 +2142,14 @@ var commonGeneratorX = class _commonGeneratorX {
|
|
|
2140
2142
|
let srctype = "ts";
|
|
2141
2143
|
ensureDirectoryExistence(row.src.pathOf[designerFileSrctype]);
|
|
2142
2144
|
_data = this.filex(`${srctype}${uctype}.designer`)(row);
|
|
2143
|
-
|
|
2145
|
+
writeFileSync2(row.src.pathOf[designerFileSrctype], _data);
|
|
2144
2146
|
if (!existsSync8(row.src.pathOf[codeFileSrctype])) {
|
|
2145
2147
|
_data = this.filex(`${srctype}${uctype}.code`)(row);
|
|
2146
|
-
|
|
2148
|
+
writeFileSync2(row.src.pathOf[codeFileSrctype], _data);
|
|
2147
2149
|
}
|
|
2148
2150
|
if (!existsSync8(row.src.pathOf.scss)) {
|
|
2149
2151
|
_data = this.filex(`${srctype}${uctype}.style`)(row);
|
|
2150
|
-
|
|
2152
|
+
writeFileSync2(row.src.pathOf.scss, _data);
|
|
2151
2153
|
}
|
|
2152
2154
|
}
|
|
2153
2155
|
}
|
|
@@ -2188,20 +2190,16 @@ var commonGeneratorX = class _commonGeneratorX {
|
|
|
2188
2190
|
});
|
|
2189
2191
|
ensureDirectoryExistence(resSrcFile);
|
|
2190
2192
|
let resContent = this.filex("ts.resources")(rowForRes);
|
|
2191
|
-
|
|
2193
|
+
writeFileSync2(resSrcFile, resContent, "utf-8");
|
|
2192
2194
|
if (!proj.config.cli.useTypeScript) {
|
|
2193
2195
|
let resSrcTypeFile = ucUtil.changeExtension(resSrcFile, ".js", ".d.ts");
|
|
2194
2196
|
let resContentTypes = this.filex("t.resources")(rowForRes);
|
|
2195
|
-
|
|
2197
|
+
writeFileSync2(resSrcTypeFile, resContentTypes, "utf-8");
|
|
2196
2198
|
}
|
|
2197
2199
|
return true;
|
|
2198
2200
|
}
|
|
2199
2201
|
};
|
|
2200
2202
|
|
|
2201
|
-
// src/lib/processes/BuildDesigner.ts
|
|
2202
|
-
import { existsSync as existsSync9, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
|
|
2203
|
-
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
2204
|
-
|
|
2205
2203
|
// node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js
|
|
2206
2204
|
var _a;
|
|
2207
2205
|
var decodeMap = /* @__PURE__ */ new Map([
|
|
@@ -7328,7 +7326,7 @@ var BuildDesigner = class {
|
|
|
7328
7326
|
</WRAPPER>`;
|
|
7329
7327
|
}
|
|
7330
7328
|
if (!existsSync9(finfo.allPathOf[pref.srcDec].scss)) {
|
|
7331
|
-
|
|
7329
|
+
writeFileSync3(finfo.allPathOf[pref.srcDec].scss, `&{
|
|
7332
7330
|
position: relative;
|
|
7333
7331
|
display:block; width: 800px; height: 500px;
|
|
7334
7332
|
background-color: #aeaeae;
|
|
@@ -8022,7 +8020,7 @@ import { fileURLToPath as fileURLToPath12 } from "node:url";
|
|
|
8022
8020
|
// src/utils/inquiry/cli_sample_style1.ts
|
|
8023
8021
|
import { dirname as dirname10, join as join13, relative as relative4, resolve as resolve10 } from "node:path";
|
|
8024
8022
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
8025
|
-
import { readFileSync as
|
|
8023
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
8026
8024
|
async function cli_sample_style1(main2) {
|
|
8027
8025
|
const cli = main2.config.cli;
|
|
8028
8026
|
const sampleroot = dirname10(join13(cli.srcDir, cli.baseCodePath));
|
|
@@ -8075,7 +8073,7 @@ function _runTemplate4(rel, options) {
|
|
|
8075
8073
|
}
|
|
8076
8074
|
function _runTemplate_x(rel, row) {
|
|
8077
8075
|
const fpath = join13(dirname10(fileURLToPath11(import.meta.url)), "utils/inquiry", rel);
|
|
8078
|
-
let content =
|
|
8076
|
+
let content = readFileSync6(fpath, "utf-8");
|
|
8079
8077
|
content = ucUtil.PHP_REMOVE(content);
|
|
8080
8078
|
const tmaker = new TemplateMaker();
|
|
8081
8079
|
const callback = tmaker.compileTemplate(content);
|
|
@@ -8089,7 +8087,6 @@ async function cli_menu_generate(main2, back_menu_callback = async () => {
|
|
|
8089
8087
|
const cmd2 = await makeMenu("G E N E R A T E", `
|
|
8090
8088
|
E = Electron Stuffs
|
|
8091
8089
|
S = Sample Style1
|
|
8092
|
-
U = 'ucconfig.js' file
|
|
8093
8090
|
V = '.vscode/settings.json' file
|
|
8094
8091
|
T = 'tsconfig.json' for project
|
|
8095
8092
|
A = Do All Above
|
|
@@ -8099,7 +8096,6 @@ async function cli_menu_generate(main2, back_menu_callback = async () => {
|
|
|
8099
8096
|
async function _select(selectedOption) {
|
|
8100
8097
|
switch (selectedOption.toLowerCase().trim()) {
|
|
8101
8098
|
case "a":
|
|
8102
|
-
await _select("u");
|
|
8103
8099
|
await _select("v");
|
|
8104
8100
|
await _select("t");
|
|
8105
8101
|
await _select("s");
|
|
@@ -8114,9 +8110,6 @@ async function cli_menu_generate(main2, back_menu_callback = async () => {
|
|
|
8114
8110
|
await cli_sample_style1(main2);
|
|
8115
8111
|
hasAddedSampleForm = true;
|
|
8116
8112
|
break;
|
|
8117
|
-
case "u":
|
|
8118
|
-
await main2._cliUcconfigInq.generateUcConfig();
|
|
8119
|
-
break;
|
|
8120
8113
|
case "e":
|
|
8121
8114
|
await main2._cliElectronInq.generate(hasAddedSampleForm);
|
|
8122
8115
|
break;
|
|
@@ -8151,6 +8144,33 @@ function _runTemplate5(rel, options) {
|
|
|
8151
8144
|
return runTemplate(join14(dirname11(fileURLToPath12(import.meta.url)), "utils/inquiry", rel), import.meta.url, options);
|
|
8152
8145
|
}
|
|
8153
8146
|
|
|
8147
|
+
// src/utils/inquiry/cli_menu_dependancy.ts
|
|
8148
|
+
async function cli_menu_dependancy(main2, back_menu_callback = async () => {
|
|
8149
|
+
}) {
|
|
8150
|
+
let hasAddedSampleForm = false;
|
|
8151
|
+
const cmd2 = await makeMenu("D E P E N D A N C Y", `
|
|
8152
|
+
E = Electron
|
|
8153
|
+
T = Type Script
|
|
8154
|
+
R = rimraf
|
|
8155
|
+
U = uc-runtime
|
|
8156
|
+
D = uc-dev
|
|
8157
|
+
C = uc-controls
|
|
8158
|
+
`, "etrudc");
|
|
8159
|
+
await _select(cmd2);
|
|
8160
|
+
async function _select(selectedOption) {
|
|
8161
|
+
const packages = [];
|
|
8162
|
+
if (selectedOption.includes("e")) packages.push("electron");
|
|
8163
|
+
if (selectedOption.includes("t")) packages.push("typescript", "@types/node");
|
|
8164
|
+
if (selectedOption.includes("r")) packages.push("rimraf");
|
|
8165
|
+
if (selectedOption.includes("u")) packages.push("uc-runtime");
|
|
8166
|
+
if (selectedOption.includes("d")) packages.push("uc-dev");
|
|
8167
|
+
if (selectedOption.includes("c")) packages.push("uc-controls");
|
|
8168
|
+
if (packages.length > 0)
|
|
8169
|
+
await main2.dependancyChecker.installPackages(packages);
|
|
8170
|
+
console.log("INSTALLED..");
|
|
8171
|
+
}
|
|
8172
|
+
}
|
|
8173
|
+
|
|
8154
8174
|
// src/utils/inquiry/cli_menu_MainMenu.ts
|
|
8155
8175
|
async function cli_menu_MainMenu(main2, back_menu_callback = async () => {
|
|
8156
8176
|
}) {
|
|
@@ -8158,12 +8178,16 @@ async function cli_menu_MainMenu(main2, back_menu_callback = async () => {
|
|
|
8158
8178
|
P = Perameters
|
|
8159
8179
|
B = Build Designers and Resource File
|
|
8160
8180
|
G = Generate
|
|
8181
|
+
D = Dependancy
|
|
8161
8182
|
Q = Quit
|
|
8162
8183
|
`, "q");
|
|
8163
8184
|
switch (cmd2.toLowerCase().trim()) {
|
|
8164
8185
|
case "b":
|
|
8165
8186
|
await main2.startBuild();
|
|
8166
8187
|
break;
|
|
8188
|
+
case "d":
|
|
8189
|
+
await cli_menu_dependancy(main2, cli_menu_MainMenu);
|
|
8190
|
+
break;
|
|
8167
8191
|
case "p":
|
|
8168
8192
|
await main2._cliSurveys.inquiry();
|
|
8169
8193
|
await cli_menu_MainMenu(main2);
|
|
@@ -8332,7 +8356,7 @@ Sub Directory Path (inside source directory) : `, fdec.subDirPath ?? "");
|
|
|
8332
8356
|
throw new Error("package.json not found in project directory");
|
|
8333
8357
|
}
|
|
8334
8358
|
const pkgJson = JSON.parse(
|
|
8335
|
-
|
|
8359
|
+
readFileSync7(pkgPath, "utf-8")
|
|
8336
8360
|
);
|
|
8337
8361
|
const deps = {
|
|
8338
8362
|
...pkgJson.dependencies,
|