@things-factory/shell 7.0.48 → 7.0.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "7.0.48",
3
+ "version": "7.0.49",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -133,5 +133,5 @@
133
133
  "pg": "^8.7.3",
134
134
  "sqlite3": "^5.0.8"
135
135
  },
136
- "gitHead": "516772ebee08900790bcc43477419d60adcb4dcd"
136
+ "gitHead": "3fdc2d9c86f8ebf1470fa5d2155b7b3019df6c0d"
137
137
  }
@@ -121,37 +121,6 @@ const bootstrap = async () => {
121
121
  })
122
122
  )
123
123
 
124
- // // Nonce 생성 미들웨어
125
- // app.use(async (ctx, next) => {
126
- // const nonce = crypto.randomBytes(16).toString('base64')
127
- // ctx.state.nonce = nonce
128
-
129
- // const cspDirectives = {
130
- // defaultSrc: ["'self'", `http://localhost:${PORT}`, 'data:'],
131
- // scriptSrc: [
132
- // "'self'",
133
- // `'nonce-${nonce}'`,
134
- // `http://localhost:${PORT}`,
135
- // 'https://trusted.cdn.com',
136
- // 'https://ajax.googleapis.com',
137
- // 'https://www.googletagmanager.com',
138
- // 'https://chancejs.com/chance.min.js'
139
- // ],
140
- // connectSrc: [
141
- // "'self'",
142
- // 'ws://localhost:*',
143
- // `http://localhost:${PORT}`,
144
- // 'https://www.google-analytics.com',
145
- // 'data:'
146
- // ],
147
- // fontSrc: ["'self'", `http://localhost:${PORT}`, 'https://fonts.gstatic.com']
148
- // }
149
- // // 개발 모드에서는 'unsafe-eval'을 허용 (비추천)
150
- // cspDirectives.scriptSrc.push("'unsafe-eval'")
151
-
152
- // await helmet.contentSecurityPolicy({ directives: cspDirectives })(ctx, next)
153
- // })
154
-
155
124
  app.use(async (ctx, next) => {
156
125
  ctx.set('X-Content-Type-Options', 'nosniff')
157
126
 
@@ -1,8 +1,16 @@
1
- <script src="//d3js.org/d3.v4.min.js"></script>
1
+ <script src="https://unpkg.com/d3@5.15.0/dist/d3.min.js"></script>
2
2
  <script src="https://unpkg.com/viz.js@1.8.0/viz.js" type="javascript/worker"></script>
3
3
  <script src="https://unpkg.com/d3-graphviz@1.3.1/build/d3-graphviz.min.js"></script>
4
4
 
5
- <div id="graph" style="text-align: center; width: 100%; height: 100%"></div>
5
+ <style nonce="<%= nonce %>">
6
+ #graph {
7
+ text-align: center;
8
+ width: 100%;
9
+ height: 100%;
10
+ }
11
+ </style>
12
+
13
+ <div id="graph"></div>
6
14
 
7
15
  <script nonce="<%= nonce %>">
8
16
  var model = <%- JSON.stringify(model) %>;
@@ -1,4 +1,4 @@
1
- <style>
1
+ <style nonce="<%= nonce %>">
2
2
  svg {
3
3
  width: 100%;
4
4
  height: 100%;
@@ -1,10 +1,16 @@
1
- <style>
1
+ <style nonce="<%= nonce %>">
2
2
  body {
3
3
  margin: 0;
4
4
  }
5
+
6
+ #embedded-sandbox {
7
+ width: 100%;
8
+ height: 100%;
9
+ }
5
10
  </style>
6
11
 
7
- <div style="width: 100%; height: 100%" id="embedded-sandbox"></div>
12
+ <div id="embedded-sandbox"></div>
13
+
8
14
  <script src="https://embeddable-sandbox.cdn.apollographql.com/_latest/embeddable-sandbox.umd.production.min.js"></script>
9
15
  <script nonce="<%= nonce %>">
10
16
  new window.EmbeddedSandbox({
@@ -56,23 +56,7 @@
56
56
  <link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
57
57
  <link rel="stylesheet" href="/theme.css" />
58
58
 
59
- <style>
60
- body {
61
- margin: 0;
62
- padding: 0;
63
- overflow: auto;
64
-
65
- /* This is a font-stack that tries to use the system-default sans-serifs first */
66
- font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
67
- line-height: 1.5;
68
- -webkit-font-smoothing: antialiased;
69
-
70
- accent-color: var(--md-sys-color-primary);
71
- background-color: var(--md-sys-color-background);
72
- }
73
- </style>
74
-
75
- <script src="/index.js" defer></script>
59
+ <script src="/static/index.js" defer></script>
76
60
 
77
61
  <!--- prefetch -->
78
62
  <link rel="prefetch" href="/public/home.js" />
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="google" content="notranslate" />
6
6
 
7
- <style>
7
+ <style nonce="<%= nonce %>">
8
8
  html,
9
9
  body {
10
10
  margin: 0;
File without changes