lincd-cli 0.1.18 → 0.1.19

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,12 +1,12 @@
1
1
  {
2
- "dev": {
3
- "NODE_ENV": "development",
4
- "SITE_ROOT": "http://localhost:4000",
5
- "DATA_ROOT": "http://localhost:4000/data"
6
- },
7
- "prod": {
8
- "NODE_ENV":"production",
9
- "SITE_ROOT":"[define me in .env-cmdrc.json]",
10
- "DATA_ROOT": "http://localhost:4000/data"
11
- }
12
- }
2
+ "dev": {
3
+ "NODE_ENV": "development",
4
+ "SITE_ROOT": "http://localhost:4000",
5
+ "DATA_ROOT": "http://localhost:4000/data"
6
+ },
7
+ "prod": {
8
+ "NODE_ENV": "production",
9
+ "SITE_ROOT": "[define me in .env-cmdrc.json]",
10
+ "DATA_ROOT": "http://localhost:4000/data"
11
+ }
12
+ }
@@ -1,10 +1,4 @@
1
1
  module.exports = {
2
- presets: [
3
- "@babel/preset-env",
4
- ["@babel/preset-react", {"runtime": "automatic"}],
5
- "@babel/preset-typescript",
6
- ],
7
- plugins: [
8
- "@babel/plugin-transform-runtime"
9
- ],
10
- };
2
+ presets: ['@babel/preset-env', ['@babel/preset-react', {runtime: 'automatic'}], '@babel/preset-typescript'],
3
+ plugins: ['@babel/plugin-transform-runtime'],
4
+ };
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- require('@babel/register')({ extensions: ['.ts', '.tsx'] });
3
- const LincdServer = require("lincd-server/lib/shapes/LincdServer");
4
- let server = new LincdServer.LincdServer({ loadAppComponent: () => require("../frontend/src/App").default });
5
- server.start();
2
+ require('@babel/register')({extensions: ['.ts', '.tsx']});
3
+ const LincdServer = require('lincd-server/lib/shapes/LincdServer');
4
+ let server = new LincdServer.LincdServer({loadAppComponent: () => require('../frontend/src/App').default});
5
+ server.start();
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
- const webpack = require("webpack");
3
- const config = require("lincd-server/site.webpack.config");
2
+ const webpack = require('webpack');
3
+ const config = require('lincd-server/site.webpack.config');
4
4
  const chalk = require('chalk');
5
- webpack(config, (err, stats) => { // [Stats Object](#stats-object)
5
+ webpack(config, (err, stats) => {
6
+ // [Stats Object](#stats-object)
6
7
  if (err) {
7
8
  console.error(err.stack || err);
8
9
  if (err.details) {
@@ -17,18 +18,20 @@ webpack(config, (err, stats) => { // [Stats Object](#stats-object)
17
18
  info.errors.forEach((e) => console.error(e));
18
19
  } else {
19
20
  // console.log(chalk.green('Finished running webpack.'));
20
- console.log(stats.toString({
21
- chunks:false,
22
- assets:true,
23
- entryPoints:false,
24
- modules:false,
25
- moduleAssets:false,
26
- moduleChunks:false,
27
- colors: true,
28
- }));
21
+ console.log(
22
+ stats.toString({
23
+ chunks: false,
24
+ assets: true,
25
+ entryPoints: false,
26
+ modules: false,
27
+ moduleAssets: false,
28
+ moduleChunks: false,
29
+ colors: true,
30
+ }),
31
+ );
29
32
  // console.log(
30
33
  // chalk.green('\t'+Object.keys(stats.compilation.assets).join('\n\t')),
31
34
  // );
32
35
  }
33
36
  process.exit();
34
- });
37
+ });
@@ -8,9 +8,9 @@ import {FrontendFileStore} from 'lincd-server/lib/shapes/FrontendFileStore';
8
8
 
9
9
  //Note that by default LINCD apps are set up with support for SCSS (sass) and CSS Modules
10
10
  //So any .scss file needs to be imported by itself
11
- import "./App.scss";
11
+ import './App.scss';
12
12
  //and then the .scss.json file needs to be imported to access the class names (this file will be automatically generated)
13
- import style from "./App.scss.json";
13
+ import style from './App.scss.json';
14
14
 
15
15
  //In React 18 you can use 'lazy' to import pages only when you need them.
16
16
  //This will cause webpack to create multiple bundles, and the right one is automatically loaded
@@ -79,8 +79,7 @@ function Layout({children}) {
79
79
  );
80
80
  }
81
81
 
82
- function Header()
83
- {
82
+ function Header() {
84
83
  return (
85
84
  <header className={style.header}>
86
85
  <h1>${name}</h1>
@@ -95,29 +94,27 @@ function Header()
95
94
  function Html({assets, children, title}) {
96
95
  return (
97
96
  <html lang="en">
98
- <head>
99
- <meta charSet="utf-8" />
100
- <meta name="viewport" content="width=device-width, initial-scale=1" />
101
- <link rel="shortcut icon" href="/static/favicon.ico" />
102
- <link rel="stylesheet" href={assets['main.css']} />
103
- {assets['tailwind-cdn'] && (
104
- <script src={assets['tailwind-cdn']}></script>
105
- )}
106
- <title>{title}</title>
107
- </head>
108
- <body>
109
- <noscript
110
- dangerouslySetInnerHTML={{
111
- __html: `<b>Enable JavaScript to run this app.</b>`,
112
- }}
113
- />
114
- {children}
115
- <script
116
- dangerouslySetInnerHTML={{
117
- __html: `assetManifest = ${JSON.stringify(assets)};`,
118
- }}
119
- />
120
- </body>
97
+ <head>
98
+ <meta charSet="utf-8" />
99
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
100
+ <link rel="shortcut icon" href="/static/favicon.ico" />
101
+ <link rel="stylesheet" href={assets['main.css']} />
102
+ {assets['tailwind-cdn'] && <script src={assets['tailwind-cdn']}></script>}
103
+ <title>{title}</title>
104
+ </head>
105
+ <body>
106
+ <noscript
107
+ dangerouslySetInnerHTML={{
108
+ __html: `<b>Enable JavaScript to run this app.</b>`,
109
+ }}
110
+ />
111
+ {children}
112
+ <script
113
+ dangerouslySetInnerHTML={{
114
+ __html: `assetManifest = ${JSON.stringify(assets)};`,
115
+ }}
116
+ />
117
+ </body>
121
118
  </html>
122
119
  );
123
120
  }
@@ -3,12 +3,13 @@ export default function Home() {
3
3
  <div>
4
4
  <h2>Get started</h2>
5
5
  <p>
6
- Your LINCD App is ready to go!<br />
6
+ Your LINCD App is ready to go!
7
+ <br />
7
8
  To edit this file, open:
8
- </p>
9
- <code>
10
- <pre>/frontend/src/pages/Home.tsx</pre>
11
- </code>
9
+ </p>
10
+ <code>
11
+ <pre>/frontend/src/pages/Home.tsx</pre>
12
+ </code>
12
13
  </div>
13
14
  );
14
15
  }
@@ -20,6 +20,8 @@
20
20
  "lincd",
21
21
  "linked code",
22
22
  "linked data",
23
+ "structured data",
24
+ "RDF",
23
25
  "semantic web",
24
26
  "web3"
25
27
  ],
@@ -31,48 +33,19 @@
31
33
  "@babel/preset-react": "^7.18.6",
32
34
  "@babel/preset-typescript": "^7.18.6",
33
35
  "@babel/register": "^7.18.9",
34
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
35
- "babel-loader": "^8.2.5",
36
- "fork-ts-checker-webpack-plugin": "6.2.6",
37
- "is-object": "^1.0.2",
38
36
  "lincd": "^0.3",
39
37
  "lincd-jsonld": "^0.1.5",
40
38
  "lincd-server": "^0.1",
41
39
  "react": "^18.2",
42
40
  "react-dom": "^18.2",
43
41
  "react-error-boundary": "^3.1.3",
44
- "react-refresh": "^0.14.0",
45
- "react-refresh-typescript": "^2.0.7",
46
- "react-router-dom": "^6.3.0",
47
- "webpack-dev-middleware": "^5.3.3",
48
- "webpack-hot-middleware": "^2.25.2"
42
+ "react-router-dom": "^6.3.0"
49
43
  },
50
44
  "devDependencies": {
51
- "@types/node": "^17.0.30",
52
45
  "@types/react": "^18.0.17",
53
46
  "@types/react-dom": "^18.0.6",
54
- "chalk": "4.1.2",
55
- "classnames": "^2.3.1",
56
- "compression": "^1.7.4",
57
- "concurrently": "^5.3.0",
58
- "cors": "^2.8.5",
59
- "cross-env": "^7.0.3",
60
47
  "env-cmd": "^10.1.0",
61
- "css-loader": "^5.2.7",
62
- "express": "^4.17.1",
63
- "lincd-cli": "^0.1",
64
- "mini-css-extract-plugin": "^1.3.3",
65
48
  "nodemon": "^2.0.6",
66
- "postcss": "^8.4.14",
67
- "postcss-import": "^14.1.0",
68
- "postcss-modules": "",
69
- "postcss-nested": "^5.0.6",
70
- "prettier": "1.19.1",
71
- "resolve": "1.12.0",
72
- "sass-loader": "^10.0",
73
- "tailwindcss": "^3.0.24",
74
- "typescript": "4.6.4",
75
- "webpack": "^5.74.0",
76
- "webpack-cli": "^4.2.0"
49
+ "lincd-cli": "^0.1"
77
50
  }
78
51
  }
package/lib/cli.js CHANGED
@@ -87,7 +87,7 @@ program
87
87
  .argument('<suggested-prefix>', 'The suggested prefix for your ontology. Also the shorthand code used for the file name and the exported ontology object')
88
88
  .argument('[uribase]', "Optional argument to set the URI base for the URI's of all entities in your ontology. Leave blank to use the URI's provided by lincd.org once you register this module");
89
89
  program.command('register-local', { hidden: true }).action(function () {
90
- register('http://localhost:4001');
90
+ register('http://localhost:4101');
91
91
  });
92
92
  program.command('register-dev', { hidden: true }).action(function () {
93
93
  register('https://dev-registry.lincd.org');
@@ -197,6 +197,9 @@ function developModule(target, mode) {
197
197
  }
198
198
  function checkWorkspaces(rootPath, workspaces, res) {
199
199
  // console.log('checking workspaces at '+rootPath+": "+workspaces.toString());
200
+ if (workspaces.packages) {
201
+ workspaces = workspaces.packages;
202
+ }
200
203
  workspaces.forEach(function (workspace) {
201
204
  var workspacePath = path.join(rootPath, workspace.replace('/*', ''));
202
205
  if (workspace.indexOf('/*') !== -1) {
@@ -224,7 +227,7 @@ function checkModulePath(rootPath, modulePath, res) {
224
227
  if (pack && pack.workspaces) {
225
228
  checkWorkspaces(modulePath, pack.workspaces, res);
226
229
  }
227
- else if ((pack && pack.lincd === true) || pack.lincd_util === true) {
230
+ else if (pack && pack.lincd === true) {
228
231
  res.push({
229
232
  path: modulePath,
230
233
  moduleName: pack.name,
@@ -930,6 +933,9 @@ var register = function (registryURL) {
930
933
  }
931
934
  else if (json.result) {
932
935
  console.log(chalk.cyan('Response: ') + json.result);
936
+ if (json.warning) {
937
+ console.log(chalk.red('Warning: ') + json.warning);
938
+ }
933
939
  }
934
940
  })["catch"](function (err) {
935
941
  console.warn(chalk.red('Warning: ') + 'Could not connect to LINCD registry');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lincd-cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Command line tools for the lincd.js library",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -25,6 +25,7 @@
25
25
  "lincd": "lib/cli.js"
26
26
  },
27
27
  "dependencies": {
28
+ "@babel/core": "^7.19.3",
28
29
  "@babel/plugin-proposal-decorators": "^7.19.3",
29
30
  "@babel/plugin-transform-runtime": "^7.19.1",
30
31
  "@babel/preset-env": "^7.19.3",