@taqueria/plugin-archetype 0.0.0-pr-695-9498331a → 0.0.0-pr-715-3fa918da

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/compile.ts CHANGED
@@ -1,83 +1,77 @@
1
- import { execCmd, sendAsyncErr, sendErr, sendJsonRes } from '@taqueria/node-sdk';
2
- import { Failure, LikeAPromise, ParsedArgs, PluginResponse, SanitizedArgs } from '@taqueria/node-sdk/types';
3
- import glob from 'fast-glob';
4
- import { readFile } from 'fs/promises';
5
- import { basename, extname, join } from 'path';
1
+ import {execCmd, sendErr, sendJsonRes, sendAsyncErr} from "@taqueria/node-sdk"
2
+ import { Failure, LikeAPromise, ParsedArgs, PluginResponse, SanitizedArgs } from "@taqueria/node-sdk/types";
3
+ import glob from 'fast-glob'
4
+ import { extname, join, basename } from 'path'
5
+ import { readFile } from 'fs/promises'
6
6
 
7
- type Opts = SanitizedArgs & { sourceFile: string };
7
+ type Opts = SanitizedArgs & {sourceFile: string}
8
8
 
9
- const getInputFilename = (opts: Opts) =>
10
- (sourceFile: string) => {
11
- const inputFile = basename(sourceFile, extname(sourceFile));
12
- return join(opts.config.contractsDir, `${inputFile}.arl`);
13
- };
9
+ const getInputFilename = (opts: Opts) => (sourceFile: string) => {
10
+ const inputFile = basename(sourceFile, extname(sourceFile))
11
+ return join(opts.config.contractsDir, `${inputFile}.arl`)
12
+ }
14
13
 
15
- const getContractArtifactFilename = (opts: Opts) =>
16
- (sourceFile: string) => {
17
- const outFile = basename(sourceFile, extname(sourceFile));
18
- return join(opts.config.artifactsDir, `${outFile}.tz`);
19
- };
14
+ const getContractArtifactFilename = (opts: Opts) => (sourceFile: string) => {
15
+ const outFile = basename(sourceFile, extname(sourceFile))
16
+ return join(opts.config.artifactsDir, `${outFile}.tz`)
17
+ }
20
18
 
21
- const getCompileCommand = (opts: Opts) =>
22
- (sourceFile: string) => {
23
- const { projectDir } = opts;
24
- const inputFile = getInputFilename(opts)(sourceFile);
25
- const baseCommand =
26
- `DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -v \"${projectDir}\":/project -w /project completium/archetype:1.2.12 ${inputFile}`;
27
- const outFile = `-o ${getContractArtifactFilename(opts)(sourceFile)}`;
28
- const cmd = `${baseCommand} ${outFile}`;
29
- return cmd;
30
- };
19
+ const getCompileCommand = (opts: Opts) => (sourceFile: string) => {
20
+ const { projectDir } = opts
21
+ const inputFile = getInputFilename(opts)(sourceFile)
22
+ const baseCommand = `DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -v \"${projectDir}\":/project -w /project completium/archetype:1.2.12 ${inputFile}`
23
+ const outFile = `-o ${getContractArtifactFilename(opts)(sourceFile)}`
24
+ const cmd = `${baseCommand} ${outFile}`
25
+ return cmd
26
+ }
31
27
 
32
- const compileContract = (opts: Opts) =>
33
- (sourceFile: string): Promise<{ contract: string; artifact: string }> =>
34
- // const sourceAbspath = join(opts.contractsDir, sourceFile)
35
- execCmd(getCompileCommand(opts)(sourceFile))
36
- .then(({ stderr }) => { // How should we output warnings?
37
- if (stderr.length > 0) sendErr(stderr);
38
- return {
39
- contract: sourceFile,
40
- artifact: getContractArtifactFilename(opts)(sourceFile),
41
- };
42
- })
43
- .catch(err => {
44
- sendErr(' ');
45
- sendErr(err.message.split('\n').slice(1).join('\n'));
46
- return Promise.resolve({
47
- contract: sourceFile,
48
- artifact: 'Not compiled',
49
- });
50
- });
28
+ const compileContract = (opts: Opts) => (sourceFile: string): Promise<{ contract: string, artifact: string }> =>
29
+ // const sourceAbspath = join(opts.contractsDir, sourceFile)
30
+ execCmd(getCompileCommand(opts)(sourceFile))
31
+ .then(({stderr}) => { // How should we output warnings?
32
+ if (stderr.length > 0) sendErr(stderr)
33
+ return {
34
+ contract: sourceFile,
35
+ artifact: getContractArtifactFilename(opts) (sourceFile)
36
+ }
37
+ })
38
+ .catch(err => {
39
+ sendErr(" ")
40
+ sendErr(err.message.split("\n").slice(1).join("\n"))
41
+ return Promise.resolve({
42
+ contract: sourceFile,
43
+ artifact: "Not compiled"
44
+ })
45
+ })
51
46
 
52
- const compileAll = (opts: Opts): Promise<{ contract: string; artifact: string }[]> => {
53
- // TODO: Fetch list of files from SDK
54
- return glob(
55
- ['**/*.arl'],
56
- { cwd: opts.contractsDir, absolute: false },
57
- )
58
- .then(entries => entries.map(compileContract(opts)))
59
- .then(processes =>
60
- processes.length > 0
61
- ? processes
62
- : [{ contract: 'None found', artifact: 'N/A' }]
63
- )
64
- .then(promises => Promise.all(promises));
65
- };
47
+ const compileAll = (opts: Opts): Promise<{ contract: string, artifact: string }[]> => {
48
+ // TODO: Fetch list of files from SDK
49
+ return glob(
50
+ ['**/*.arl'],
51
+ { cwd: opts.contractsDir, absolute: false }
52
+ )
53
+ .then(entries => entries.map(compileContract(opts)))
54
+ .then(processes => processes.length > 0
55
+ ? processes
56
+ : [{contract: "None found", artifact: "N/A"}]
57
+ )
58
+ .then(promises => Promise.all(promises))
59
+ }
66
60
 
67
61
  const compile = <T>(parsedArgs: SanitizedArgs): LikeAPromise<PluginResponse, Failure<T>> => {
68
- const params = parsedArgs as Opts;
69
- const p = parsedArgs.sourceFile
70
- ? compileContract(params)(params.sourceFile)
71
- .then(result => [result])
72
- : compileAll(params)
73
- .then(results => {
74
- if (results.length === 0) sendErr('No contracts found to compile.');
75
- return results;
76
- });
62
+ const params = parsedArgs as Opts
63
+ const p = parsedArgs.sourceFile
64
+ ? compileContract(params) (params.sourceFile)
65
+ .then(result => [result])
66
+ : compileAll(params)
67
+ .then(results => {
68
+ if (results.length === 0) sendErr("No contracts found to compile.")
69
+ return results
70
+ })
71
+
72
+ return p
73
+ .then(sendJsonRes)
74
+ .catch(err => sendAsyncErr(err, false))
75
+ }
77
76
 
78
- return p
79
- .then(sendJsonRes)
80
- .catch(err => sendAsyncErr(err, false));
81
- };
82
-
83
- export default compile;
77
+ export default compile
package/index.js CHANGED
@@ -36,11 +36,11 @@ const $bb055a91efa18df7$var$compileContract = (opts)=>(sourceFile)=>// const sou
36
36
  artifact: $bb055a91efa18df7$var$getContractArtifactFilename(opts)(sourceFile)
37
37
  };
38
38
  }).catch((err)=>{
39
- $dTHpf$taquerianodesdk.sendErr(' ');
40
- $dTHpf$taquerianodesdk.sendErr(err.message.split('\n').slice(1).join('\n'));
39
+ $dTHpf$taquerianodesdk.sendErr(" ");
40
+ $dTHpf$taquerianodesdk.sendErr(err.message.split("\n").slice(1).join("\n"));
41
41
  return Promise.resolve({
42
42
  contract: sourceFile,
43
- artifact: 'Not compiled'
43
+ artifact: "Not compiled"
44
44
  });
45
45
  })
46
46
  ;
@@ -54,8 +54,8 @@ const $bb055a91efa18df7$var$compileAll = (opts)=>{
54
54
  }).then((entries)=>entries.map($bb055a91efa18df7$var$compileContract(opts))
55
55
  ).then((processes)=>processes.length > 0 ? processes : [
56
56
  {
57
- contract: 'None found',
58
- artifact: 'N/A'
57
+ contract: "None found",
58
+ artifact: "N/A"
59
59
  }
60
60
  ]
61
61
  ).then((promises)=>Promise.all(promises)
@@ -67,7 +67,7 @@ const $bb055a91efa18df7$var$compile = (parsedArgs)=>{
67
67
  result
68
68
  ]
69
69
  ) : $bb055a91efa18df7$var$compileAll(params).then((results)=>{
70
- if (results.length === 0) $dTHpf$taquerianodesdk.sendErr('No contracts found to compile.');
70
+ if (results.length === 0) $dTHpf$taquerianodesdk.sendErr("No contracts found to compile.");
71
71
  return results;
72
72
  });
73
73
  return p.then($dTHpf$taquerianodesdk.sendJsonRes).catch((err)=>$dTHpf$taquerianodesdk.sendAsyncErr(err, false)
@@ -77,39 +77,39 @@ var $bb055a91efa18df7$export$2e2bcd8739ae039 = $bb055a91efa18df7$var$compile;
77
77
 
78
78
 
79
79
  $dTHpf$taquerianodesdk.Plugin.create((i18n)=>({
80
- schema: '1.0',
81
- version: '0.1',
82
- alias: 'archetype',
80
+ schema: "1.0",
81
+ version: "0.1",
82
+ alias: "archetype",
83
83
  tasks: [
84
84
  $dTHpf$taquerianodesdk.Task.create({
85
- task: 'compile',
86
- command: 'compile [sourceFile]',
85
+ task: "compile",
86
+ command: "compile [sourceFile]",
87
87
  aliases: [
88
- 'c',
89
- 'compile-archetype'
88
+ "c",
89
+ "compile-archetype"
90
90
  ],
91
- description: 'Compile a smart contract written in a Archetype syntax to Michelson code',
91
+ description: "Compile a smart contract written in a Archetype syntax to Michelson code",
92
92
  options: [],
93
- handler: 'proxy',
94
- encoding: 'json'
95
- }),
93
+ handler: "proxy",
94
+ encoding: "json"
95
+ })
96
96
  ],
97
97
  checkRuntimeDependencies: ()=>Promise.resolve({
98
- status: 'success',
98
+ status: "success",
99
99
  report: [
100
100
  {
101
- name: 'Archetype',
102
- path: 'archetype',
103
- version: '>=1.2.12',
104
- kind: 'required',
101
+ name: "Archetype",
102
+ path: "archetype",
103
+ version: ">=1.2.12",
104
+ kind: "required",
105
105
  met: true
106
- },
106
+ }
107
107
  ]
108
108
  })
109
109
  ,
110
110
  installRunTimeDependencies: ()=>Promise.resolve({
111
- status: 'success',
112
- output: 'Archetype was found in /usr/bin/archetype'
111
+ status: "success",
112
+ output: "Archetype was found in /usr/bin/archetype" // TODO this should use i18n
113
113
  })
114
114
  ,
115
115
  proxy: $bb055a91efa18df7$export$2e2bcd8739ae039
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;ACAA;;;AAQA,MAAM,sCAAgB,GAAG,CAAC,IAAU,GACnC,CAAC,UAAkB,GAAK;QACvB,MAAM,SAAS,GAAG,oBAAQ,CAAC,UAAU,EAAE,mBAAO,CAAC,UAAU,CAAC,CAAC,AAAC;QAC5D,OAAO,gBAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KAC1D;AAAC;AAEH,MAAM,iDAA2B,GAAG,CAAC,IAAU,GAC9C,CAAC,UAAkB,GAAK;QACvB,MAAM,OAAO,GAAG,oBAAQ,CAAC,UAAU,EAAE,mBAAO,CAA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AAC,CACjB,KAAK,CAAC,CAAA,GAAG,GAAI,mCAAY,CAAC,GAAG,EAAE,KAAK,CAAC;IAAA,CAAC,CAAC;CACzC,AAAC;IAEF,wCAAuB,GAAR,6BAAO;;;AD/EtB,6BAAM,CAAC,MAAM,CAAC,CAAA,IAAI,GAAK,CAAA;QACtB,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE;YACN,2BAAI,CAAC,MAAM,CAAC;gBACX,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,sBAAsB;gBAC/B,OAAO,EAAE;oBAAC,GAAG;oBAAE,mBAAmB;iBAAC;gBACnC,WAAW,EAAE,0EAA0E;gBACvF,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,MAAM;aAChB,CAAC;SACF;QACD,wBAAwB,EAAE,IACzB,OAAO,CAAC,OAAO,CAAC;gBACf,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE;oBACP;wBAAE,IAAI,EAAE,WAAW;wBAAE,IAAI,EAAE,WAAW;wBAAE,OAAO,EAAE,UAAU;wBAAE,IAAI,EAAE,UAAU;wBAAE,GAAG,EAAE,IAAI;qBAAE;iBAC1F;aACD,CAAC;QAAA;QACH,0BAA0B,EAAE,IAC3B,OAAO,CAAC,OAAO,CAAC;gBACf,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,2CAA2C;aACnD,CAAC;QAAA;QACH,KAAK,EAAE,wCAAO;KACd,CAAA;AAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC","sources":["taqueria-plugin-archetype/index.ts","taqueria-plugin-archetype/compile.ts"],"sourcesContent":["import { Option, Plugin, Task } from '@taqueria/node-sdk';\nimport compile from './compile';\n\nPlugin.create(i18n => ({\n\tschema: '1.0',\n\tversion: '0.1',\n\talias: 'archetype',\n\ttasks: [\n\t\tTask.create({\n\t\t\ttask: 'compile',\n\t\t\tcommand: 'compile [sourceFile]',\n\t\t\taliases: ['c', 'compile-archetype'],\n\t\t\tdescription: 'Compile a smart contract written in a Archetype syntax to Michelson code',\n\t\t\toptions: [],\n\t\t\thandler: 'proxy',\n\t\t\tencoding: 'json',\n\t\t}),\n\t],\n\tcheckRuntimeDependencies: () =>\n\t\tPromise.resolve({\n\t\t\tstatus: 'success',\n\t\t\treport: [\n\t\t\t\t{ name: 'Archetype', path: 'archetype', version: '>=1.2.12', kind: 'required', met: true },\n\t\t\t],\n\t\t}),\n\tinstallRunTimeDependencies: () =>\n\t\tPromise.resolve({\n\t\t\tstatus: 'success',\n\t\t\toutput: 'Archetype was found in /usr/bin/archetype', // TODO this should use i18n\n\t\t}),\n\tproxy: compile,\n}), process.argv);\n","import { execCmd, sendAsyncErr, sendErr, sendJsonRes } from '@taqueria/node-sdk';\nimport { Failure, LikeAPromise, ParsedArgs, PluginResponse, SanitizedArgs } from '@taqueria/node-sdk/types';\nimport glob from 'fast-glob';\nimport { readFile } from 'fs/promises';\nimport { basename, extname, join } from 'path';\n\ntype Opts = SanitizedArgs & { sourceFile: string };\n\nconst getInputFilename = (opts: Opts) =>\n\t(sourceFile: string) => {\n\t\tconst inputFile = basename(sourceFile, extname(sourceFile));\n\t\treturn join(opts.config.contractsDir, `${inputFile}.arl`);\n\t};\n\nconst getContractArtifactFilename = (opts: Opts) =>\n\t(sourceFile: string) => {\n\t\tconst outFile = basename(sourceFile, extname(sourceFile));\n\t\treturn join(opts.config.artifactsDir, `${outFile}.tz`);\n\t};\n\nconst getCompileCommand = (opts: Opts) =>\n\t(sourceFile: string) => {\n\t\tconst { projectDir } = opts;\n\t\tconst inputFile = getInputFilename(opts)(sourceFile);\n\t\tconst baseCommand =\n\t\t\t`DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -v \\\"${projectDir}\\\":/project -w /project completium/archetype:1.2.12 ${inputFile}`;\n\t\tconst outFile = `-o ${getContractArtifactFilename(opts)(sourceFile)}`;\n\t\tconst cmd = `${baseCommand} ${outFile}`;\n\t\treturn cmd;\n\t};\n\nconst compileContract = (opts: Opts) =>\n\t(sourceFile: string): Promise<{ contract: string; artifact: string }> =>\n\t\t// const sourceAbspath = join(opts.contractsDir, sourceFile)\n\t\texecCmd(getCompileCommand(opts)(sourceFile))\n\t\t\t.then(({ stderr }) => { // How should we output warnings?\n\t\t\t\tif (stderr.length > 0) sendErr(stderr);\n\t\t\t\treturn {\n\t\t\t\t\tcontract: sourceFile,\n\t\t\t\t\tartifact: getContractArtifactFilename(opts)(sourceFile),\n\t\t\t\t};\n\t\t\t})\n\t\t\t.catch(err => {\n\t\t\t\tsendErr(' ');\n\t\t\t\tsendErr(err.message.split('\\n').slice(1).join('\\n'));\n\t\t\t\treturn Promise.resolve({\n\t\t\t\t\tcontract: sourceFile,\n\t\t\t\t\tartifact: 'Not compiled',\n\t\t\t\t});\n\t\t\t});\n\nconst compileAll = (opts: Opts): Promise<{ contract: string; artifact: string }[]> => {\n\t// TODO: Fetch list of files from SDK\n\treturn glob(\n\t\t['**/*.arl'],\n\t\t{ cwd: opts.contractsDir, absolute: false },\n\t)\n\t\t.then(entries => entries.map(compileContract(opts)))\n\t\t.then(processes =>\n\t\t\tprocesses.length > 0\n\t\t\t\t? processes\n\t\t\t\t: [{ contract: 'None found', artifact: 'N/A' }]\n\t\t)\n\t\t.then(promises => Promise.all(promises));\n};\n\nconst compile = <T>(parsedArgs: SanitizedArgs): LikeAPromise<PluginResponse, Failure<T>> => {\n\tconst params = parsedArgs as Opts;\n\tconst p = parsedArgs.sourceFile\n\t\t? compileContract(params)(params.sourceFile)\n\t\t\t.then(result => [result])\n\t\t: compileAll(params)\n\t\t\t.then(results => {\n\t\t\t\tif (results.length === 0) sendErr('No contracts found to compile.');\n\t\t\t\treturn results;\n\t\t\t});\n\n\treturn p\n\t\t.then(sendJsonRes)\n\t\t.catch(err => sendAsyncErr(err, false));\n};\n\nexport default compile;\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"}
1
+ {"mappings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,2CAA2C,CAAC,4BAA4B;aACnF,CAAC;QAAA;QACF,KAAK,EAAE,wCAAO;KACjB,CAAA;AAAC,EAAE,OAAO,CAAC,IAAI,CAAC","sources":["taqueria-plugin-archetype/index.ts","taqueria-plugin-archetype/compile.ts"],"sourcesContent":["import {Plugin, Task, Option} from '@taqueria/node-sdk'\nimport compile from './compile'\n\nPlugin.create(i18n => ({\n schema: \"1.0\",\n version: \"0.1\",\n alias: \"archetype\",\n tasks: [\n Task.create({\n task: \"compile\",\n command: \"compile [sourceFile]\",\n aliases: [\"c\", \"compile-archetype\"],\n description: \"Compile a smart contract written in a Archetype syntax to Michelson code\",\n options: [],\n handler: \"proxy\",\n encoding: \"json\"\n })\n ],\n checkRuntimeDependencies: () => Promise.resolve({\n status: \"success\",\n report: [\n {name: \"Archetype\", path: \"archetype\", version: \">=1.2.12\", kind: \"required\", met: true}\n ]\n }),\n installRunTimeDependencies: () => Promise.resolve({\n status: \"success\",\n output: \"Archetype was found in /usr/bin/archetype\" // TODO this should use i18n\n }),\n proxy: compile\n}), process.argv)","import {execCmd, sendErr, sendJsonRes, sendAsyncErr} from \"@taqueria/node-sdk\"\nimport { Failure, LikeAPromise, ParsedArgs, PluginResponse, SanitizedArgs } from \"@taqueria/node-sdk/types\";\nimport glob from 'fast-glob'\nimport { extname, join, basename } from 'path'\nimport { readFile } from 'fs/promises'\n\ntype Opts = SanitizedArgs & {sourceFile: string}\n\nconst getInputFilename = (opts: Opts) => (sourceFile: string) => {\n const inputFile = basename(sourceFile, extname(sourceFile))\n return join(opts.config.contractsDir, `${inputFile}.arl`)\n}\n\nconst getContractArtifactFilename = (opts: Opts) => (sourceFile: string) => {\n const outFile = basename(sourceFile, extname(sourceFile))\n return join(opts.config.artifactsDir, `${outFile}.tz`)\n}\n\nconst getCompileCommand = (opts: Opts) => (sourceFile: string) => {\n const { projectDir } = opts\n const inputFile = getInputFilename(opts)(sourceFile)\n const baseCommand = `DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -v \\\"${projectDir}\\\":/project -w /project completium/archetype:1.2.12 ${inputFile}`\n const outFile = `-o ${getContractArtifactFilename(opts)(sourceFile)}`\n const cmd = `${baseCommand} ${outFile}`\n return cmd\n}\n\nconst compileContract = (opts: Opts) => (sourceFile: string): Promise<{ contract: string, artifact: string }> =>\n // const sourceAbspath = join(opts.contractsDir, sourceFile)\n execCmd(getCompileCommand(opts)(sourceFile))\n .then(({stderr}) => { // How should we output warnings?\n if (stderr.length > 0) sendErr(stderr)\n return {\n contract: sourceFile,\n artifact: getContractArtifactFilename(opts) (sourceFile)\n }\n })\n .catch(err => {\n sendErr(\" \")\n sendErr(err.message.split(\"\\n\").slice(1).join(\"\\n\"))\n return Promise.resolve({\n contract: sourceFile,\n artifact: \"Not compiled\"\n })\n })\n\nconst compileAll = (opts: Opts): Promise<{ contract: string, artifact: string }[]> => {\n // TODO: Fetch list of files from SDK\n return glob(\n ['**/*.arl'],\n { cwd: opts.contractsDir, absolute: false }\n )\n .then(entries => entries.map(compileContract(opts)))\n .then(processes => processes.length > 0\n ? processes\n : [{contract: \"None found\", artifact: \"N/A\"}]\n )\n .then(promises => Promise.all(promises))\n}\n\nconst compile = <T>(parsedArgs: SanitizedArgs): LikeAPromise<PluginResponse, Failure<T>> => {\n const params = parsedArgs as Opts\n const p = parsedArgs.sourceFile\n ? compileContract(params) (params.sourceFile)\n .then(result => [result])\n : compileAll(params)\n .then(results => {\n if (results.length === 0) sendErr(\"No contracts found to compile.\")\n return results\n })\n \n return p\n .then(sendJsonRes)\n .catch(err => sendAsyncErr(err, false))\n}\n\nexport default compile"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"}
package/index.ts CHANGED
@@ -1,32 +1,30 @@
1
- import { Option, Plugin, Task } from '@taqueria/node-sdk';
2
- import compile from './compile';
1
+ import {Plugin, Task, Option} from '@taqueria/node-sdk'
2
+ import compile from './compile'
3
3
 
4
4
  Plugin.create(i18n => ({
5
- schema: '1.0',
6
- version: '0.1',
7
- alias: 'archetype',
8
- tasks: [
9
- Task.create({
10
- task: 'compile',
11
- command: 'compile [sourceFile]',
12
- aliases: ['c', 'compile-archetype'],
13
- description: 'Compile a smart contract written in a Archetype syntax to Michelson code',
14
- options: [],
15
- handler: 'proxy',
16
- encoding: 'json',
17
- }),
18
- ],
19
- checkRuntimeDependencies: () =>
20
- Promise.resolve({
21
- status: 'success',
22
- report: [
23
- { name: 'Archetype', path: 'archetype', version: '>=1.2.12', kind: 'required', met: true },
24
- ],
25
- }),
26
- installRunTimeDependencies: () =>
27
- Promise.resolve({
28
- status: 'success',
29
- output: 'Archetype was found in /usr/bin/archetype', // TODO this should use i18n
30
- }),
31
- proxy: compile,
32
- }), process.argv);
5
+ schema: "1.0",
6
+ version: "0.1",
7
+ alias: "archetype",
8
+ tasks: [
9
+ Task.create({
10
+ task: "compile",
11
+ command: "compile [sourceFile]",
12
+ aliases: ["c", "compile-archetype"],
13
+ description: "Compile a smart contract written in a Archetype syntax to Michelson code",
14
+ options: [],
15
+ handler: "proxy",
16
+ encoding: "json"
17
+ })
18
+ ],
19
+ checkRuntimeDependencies: () => Promise.resolve({
20
+ status: "success",
21
+ report: [
22
+ {name: "Archetype", path: "archetype", version: ">=1.2.12", kind: "required", met: true}
23
+ ]
24
+ }),
25
+ installRunTimeDependencies: () => Promise.resolve({
26
+ status: "success",
27
+ output: "Archetype was found in /usr/bin/archetype" // TODO this should use i18n
28
+ }),
29
+ proxy: compile
30
+ }), process.argv)
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
1
  {
2
- "name": "@taqueria/plugin-archetype",
3
- "version": "0.0.0-pr-695-9498331a",
4
- "description": "A taqueria plugin for compiling Archetype smart contracts",
5
- "targets": {
6
- "default": {
7
- "source": "./index.ts",
8
- "distDir": "./",
9
- "context": "node",
10
- "isLibrary": true
11
- }
12
- },
13
- "scripts": {
14
- "test": "echo \"Error: no test specified\" && exit 1",
15
- "build": "npx tsc -noEmit && npx parcel build --no-cache 2>&1",
16
- "pluginInfo": "npx ts-node index.ts --taqRun pluginInfo --i18n {\"foo:\"\"bar\"}",
17
- "compile": "node index.js --taqRun proxy --task compile --i18n '{\"foo\":\"bar\"}' --config '{\"contractsDir\":\"contracts\",\"testsDir\": \"tests\",\"artifactsDir\": \"artifacts\"}' --projectDir ../test-project --configDir ./.taq",
18
- "debugPluginInfo": "node --inspect index.js --taqRun pluginInfo --i18n '{\"foo\":\"bar\"}' --config '{\"contractsDir\":\"contracts\",\"testsDir\": \"tests\"}' --projectDir ../test-project --configDir ./.taq"
19
- },
20
- "keywords": [
21
- "taqueria",
22
- "tezos",
23
- "build",
24
- "ecad",
25
- "ecadlabs",
26
- "plugin",
27
- "archetype",
28
- "smart contract",
29
- "compile"
30
- ],
31
- "author": "ECAD Labs",
32
- "license": "Apache-2.0",
33
- "repository": {
34
- "type": "git",
35
- "url": "https://github.com/ecadlabs/taqueria.git",
36
- "directory": "taqueria-plugin-archetype"
37
- },
38
- "bugs": {
39
- "url": "https://github.com/ecadlabs/taqueria/issues"
40
- },
41
- "homepage": "https://github.com/ecadlabs/taqueria#readme",
42
- "dependencies": {
43
- "@taqueria/node-sdk": "^0.3.0",
44
- "fast-glob": "^3.2.7"
45
- },
46
- "devDependencies": {
47
- "parcel": "^2.4.0",
48
- "typescript": "4.5.4"
49
- }
2
+ "name": "@taqueria/plugin-archetype",
3
+ "version": "0.0.0-pr-715-3fa918da",
4
+ "description": "A taqueria plugin for compiling Archetype smart contracts",
5
+ "targets": {
6
+ "default": {
7
+ "source": "./index.ts",
8
+ "distDir": "./",
9
+ "context": "node",
10
+ "isLibrary": true
11
+ }
12
+ },
13
+ "scripts": {
14
+ "test": "echo \"Error: no test specified\" && exit 1",
15
+ "build": "npx tsc -noEmit && npx parcel build --no-cache 2>&1",
16
+ "pluginInfo": "npx ts-node index.ts --taqRun pluginInfo --i18n {\"foo:\"\"bar\"}",
17
+ "compile": "node index.js --taqRun proxy --task compile --i18n '{\"foo\":\"bar\"}' --config '{\"contractsDir\":\"contracts\",\"testsDir\": \"tests\",\"artifactsDir\": \"artifacts\"}' --projectDir ../test-project --configDir ./.taq",
18
+ "debugPluginInfo": "node --inspect index.js --taqRun pluginInfo --i18n '{\"foo\":\"bar\"}' --config '{\"contractsDir\":\"contracts\",\"testsDir\": \"tests\"}' --projectDir ../test-project --configDir ./.taq"
19
+ },
20
+ "keywords": [
21
+ "taqueria",
22
+ "tezos",
23
+ "build",
24
+ "ecad",
25
+ "ecadlabs",
26
+ "plugin",
27
+ "archetype",
28
+ "smart contract",
29
+ "compile"
30
+ ],
31
+ "author": "ECAD Labs",
32
+ "license": "Apache-2.0",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/ecadlabs/taqueria.git",
36
+ "directory": "taqueria-plugin-archetype"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/ecadlabs/taqueria/issues"
40
+ },
41
+ "homepage": "https://github.com/ecadlabs/taqueria#readme",
42
+ "dependencies": {
43
+ "@taqueria/node-sdk": "^0.3.1",
44
+ "fast-glob": "^3.2.7"
45
+ },
46
+ "devDependencies": {
47
+ "parcel": "^2.4.0",
48
+ "typescript": "4.5.4"
49
+ }
50
50
  }
package/tsconfig.json CHANGED
@@ -1,101 +1,101 @@
1
1
  {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
4
 
5
- /* Projects */
6
- // "incremental": true, /* Enable incremental compilation */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
5
+ /* Projects */
6
+ // "incremental": true, /* Enable incremental compilation */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
12
 
13
- /* Language and Environment */
14
- "target": "ES2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- // "jsx": "preserve", /* Specify what JSX code is generated. */
17
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
20
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
22
- // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
23
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
13
+ /* Language and Environment */
14
+ "target": "ES2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
22
+ // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
25
 
26
- /* Modules */
27
- "module": "CommonJS", /* Specify what module code is generated. */
28
- // "rootDir": "./", /* Specify the root folder within your source files. */
29
- // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
30
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
31
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
32
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
33
- // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
34
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
35
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
36
- // "resolveJsonModule": true, /* Enable importing .json files */
37
- // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
26
+ /* Modules */
27
+ "module": "CommonJS", /* Specify what module code is generated. */
28
+ // "rootDir": "./", /* Specify the root folder within your source files. */
29
+ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
30
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
31
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
32
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
33
+ // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
34
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
35
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
36
+ // "resolveJsonModule": true, /* Enable importing .json files */
37
+ // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
38
38
 
39
- /* JavaScript Support */
40
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
41
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
42
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
39
+ /* JavaScript Support */
40
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
41
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
42
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
43
43
 
44
- /* Emit */
45
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
46
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
47
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
48
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
49
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
50
- // "outDir": "./", /* Specify an output folder for all emitted files. */
51
- // "removeComments": true, /* Disable emitting comments. */
52
- // "noEmit": true, /* Disable emitting files from a compilation. */
53
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
54
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
55
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
56
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
57
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
59
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
60
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
61
- // "newLine": "crlf", /* Set the newline character for emitting files. */
62
- // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
63
- // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
64
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
65
- // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
66
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
67
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
44
+ /* Emit */
45
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
46
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
47
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
48
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
49
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
50
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
51
+ // "removeComments": true, /* Disable emitting comments. */
52
+ // "noEmit": true, /* Disable emitting files from a compilation. */
53
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
54
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
55
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
56
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
57
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
59
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
60
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
61
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
62
+ // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
63
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
64
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
65
+ // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
66
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
67
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
68
68
 
69
- /* Interop Constraints */
70
- "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
71
- "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
72
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
73
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
74
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
69
+ /* Interop Constraints */
70
+ "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
71
+ "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
72
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
73
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
74
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
75
75
 
76
- /* Type Checking */
77
- "strict": true, /* Enable all strict type-checking options. */
78
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
79
- // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
80
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
81
- // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
82
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
83
- // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
84
- // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
85
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
86
- // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
87
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
88
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
89
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
90
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
91
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
92
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
93
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
94
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
95
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
76
+ /* Type Checking */
77
+ "strict": true, /* Enable all strict type-checking options. */
78
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
79
+ // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
80
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
81
+ // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
82
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
83
+ // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
84
+ // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
85
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
86
+ // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
87
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
88
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
89
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
90
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
91
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
92
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
93
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
94
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
95
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
96
96
 
97
- /* Completeness */
98
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
99
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
100
- }
97
+ /* Completeness */
98
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
99
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
100
+ }
101
101
  }