oneentry 1.0.61 → 1.0.62
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/configure.js +49 -0
- package/dist/base/attributes.d.ts +6 -0
- package/dist/base/attributes.js +6 -0
- package/package.json +4 -1
package/configure.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const readline = require('readline');
|
|
7
|
+
|
|
8
|
+
const rl = readline.createInterface({
|
|
9
|
+
input: process.stdin,
|
|
10
|
+
output: process.stdout
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
rl.question('Enter project name witht https://... : ', (name) => {
|
|
14
|
+
rl.question('Enter token: ', (token) => {
|
|
15
|
+
rl.close()
|
|
16
|
+
createInterface(name, token)
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
function createInterface(name, token) {
|
|
22
|
+
const filePath = 'example.ts'
|
|
23
|
+
fs.writeFile(filePath,
|
|
24
|
+
|
|
25
|
+
`
|
|
26
|
+
type BuildInterface<T extends string[]> = {
|
|
27
|
+
[K in T[number]]: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface IAttributesList extends BuildInterface<['${name}', '${token}', 'value3']> {}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
IAttributesList
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
, (err) => {
|
|
39
|
+
if (err) {
|
|
40
|
+
console.error(err);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.log(`Successfully created ${filePath}`);
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneentry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "jest"
|
|
12
12
|
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"lavss": "./configure.js"
|
|
15
|
+
},
|
|
13
16
|
"author": "ONEENTRY PORTAL CO.",
|
|
14
17
|
"license": "ISC",
|
|
15
18
|
"dependencies": {
|