plasmicapp / plasmic

Visual builder for React. Build apps, websites, and content. Integrate with your codebase.
https://www.plasmic.app
MIT License
4.72k stars 382 forks source link

add nonce to PlasmicCanvasHost #40

Closed dusty closed 2 years ago

dusty commented 2 years ago

We use a strict content-security-policy, which does not allow unsafe-inline. This should allow us to pass a nonce to it.

<PlasmicCanvasHost nonce="xxxxx" />
vercel[bot] commented 2 years ago

@dusty is attempting to deploy a commit to the Plasmic Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
contenful-example ✅ Ready (Inspect) Visit Preview May 26, 2022 at 6:33PM (UTC)
plasmic ✅ Ready (Inspect) Visit Preview May 26, 2022 at 6:33PM (UTC)
vercel-workflow ✅ Ready (Inspect) Visit Preview May 26, 2022 at 6:33PM (UTC)
dusty commented 2 years ago

NOTE I was unable to test locally because yarn fails on installation, perhaps this is a node18 problem.

Exit code: 1
Command: node-gyp-build
Arguments: 
Directory: /Users/dusty/tmp/plasmic/plasmic/node_modules/lmdb-store
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@18.0.0 | darwin | x64
gyp info find Python using Python version 3.9.12 found at "/usr/local/opt/python@3.9/bin/python3.9"
(node:37682) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
gyp info spawn args [
gyp info spawn args   '/Users/dusty/tmp/plasmic/plasmic/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/dusty/tmp/plasmic/plasmic/node_modules/lmdb-store/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/dusty/tmp/plasmic/plasmic/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/dusty/Library/Caches/node-gyp/18.0.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/dusty/tmp/plasmic/plasmic/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/dusty/Library/Caches/node-gyp/18.0.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/dusty/tmp/plasmic/plasmic/node_modules/lmdb-store',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/lmdb/src/node-lmdb.o
In file included from ../src/node-lmdb.cpp:1:
In file included from ../src/node-lmdb.h:32:
../../nan/nan.h:2544:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
  tpl->SetAccessor(
       ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")
  ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
1 warning generated.
  CC(target) Release/obj.target/lmdb/dependencies/lmdb/libraries/liblmdb/midl.o
  CC(target) Release/obj.target/lmdb/dependencies/lmdb/libraries/liblmdb/chacha8.o
  CC(target) Release/obj.target/lmdb/dependencies/lz4/lib/lz4.o
  CXX(target) Release/obj.target/lmdb/src/env.o
In file included from ../src/env.cpp:25:
In file included from ../src/node-lmdb.h:32:
../../nan/nan.h:2544:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
  tpl->SetAccessor(
       ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")
  ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
1 warning generated.
  CXX(target) Release/obj.target/lmdb/src/compression.o
In file included from ../src/compression.cpp:26:
In file included from ../src/node-lmdb.h:32:
../../nan/nan.h:2544:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
  tpl->SetAccessor(
       ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")
  ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
1 warning generated.
  CXX(target) Release/obj.target/lmdb/src/ordered-binary.o
In file included from ../src/ordered-binary.cpp:1:
In file included from ../src/node-lmdb.h:32:
../../nan/nan.h:2544:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
  tpl->SetAccessor(
       ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")
  ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
../src/ordered-binary.cpp:138:92: error: too few arguments to function call, single argument 'isolate' was not specified
        Local<String> string = Local<String>::Cast(Local<Symbol>::Cast(jsKey)->Description());
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/dusty/Library/Caches/node-gyp/18.0.0/include/node/v8-primitive.h:588:16: note: 'Description' declared here
  Local<Value> Description(Isolate* isolate) const;
               ^
1 warning and 1 error generated.
make: *** [Release/obj.target/lmdb/src/ordered-binary.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dusty/tmp/plasmic/plasmic/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/usr/local/Cellar/node/18.0.0/bin/node" "/Users/dusty/tmp/plasmic/plasmic/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/dusty/tmp/plasmic/plasmic/node_modules/lmdb-store
dusty commented 2 years ago

I apologize, it looks like I missed another script that handles RealEventSource.

dusty commented 2 years ago

Going to start over

zvictor commented 1 year ago

@dusty I am having the same issue with lmdb-store and node-gyp-build. Are you still hitting that?