Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions node/corepack
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/node_modules/corepack/dist/corepack.js" "$@"
else
exec node "$basedir/node_modules/corepack/dist/corepack.js" "$@"
fi
7 changes: 7 additions & 0 deletions node/corepack.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@SETLOCAL
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\corepack\dist\corepack.js" %*
) ELSE (
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\node_modules\corepack\dist\corepack.js" %*
)
55 changes: 55 additions & 0 deletions node/install_tools.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@echo off

setlocal
title Install Additional Tools for Node.js

cls

echo ====================================================
echo Tools for Node.js Native Modules Installation Script
echo ====================================================
echo.
echo This script will install Python and the Visual Studio Build Tools, necessary
echo to compile Node.js native modules. Note that Chocolatey and required Windows
echo updates will also be installed.
echo.
echo This will require about 3 GiB of free disk space, plus any space necessary to
echo install Windows updates. This will take a while to run.
echo.
echo Please close all open programs for the duration of the installation. If the
echo installation fails, please ensure Windows is fully updated, reboot your
echo computer and try to run this again. This script can be found in the
echo Start menu under Node.js.
echo.
echo You can close this window to stop now. Detailed instructions to install these
echo tools manually are available at https://github.com/nodejs/node-gyp#on-windows
echo.
pause

cls

REM Adapted from https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/79bbe5bdc4867088b3e074f9610932f8e4e192c2/README.md#legal
echo Using this script downloads third party software
echo ------------------------------------------------
echo This script will direct to Chocolatey to install packages. By using
echo Chocolatey to install a package, you are accepting the license for the
echo application, executable(s), or other artifacts delivered to your machine as a
echo result of a Chocolatey install. This acceptance occurs whether you know the
echo license terms or not. Read and understand the license terms of the packages
echo being installed and their dependencies prior to installation:
echo - https://chocolatey.org/packages/chocolatey
echo - https://chocolatey.org/packages/python
echo - https://chocolatey.org/packages/visualstudio2019-workload-vctools
echo.
echo This script is provided AS-IS without any warranties of any kind
echo ----------------------------------------------------------------
echo Chocolatey has implemented security safeguards in their process to help
echo protect the community from malicious or pirated software, but any use of this
echo script is at your own risk. Please read the Chocolatey's legal terms of use
echo as well as how the community repository for Chocolatey.org is maintained.
echo.
pause

cls

"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2019-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs
Binary file added node/node.exe
Binary file not shown.
115 changes: 115 additions & 0 deletions node/node_etw_provider.man
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<instrumentationManifest xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<instrumentation>
<events>
<provider name="NodeJS-ETW-provider" guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" symbol="NODE_ETW_PROVIDER" message="$(string.NodeJS-ETW-provider.name)" messageFileName="D:\Schoolwerk\Stage\muse-ideas\node\node.exe" resourceFileName="D:\Schoolwerk\Stage\muse-ideas\node\node.exe">

<tasks>
<task name="MethodRuntime" value="1" symbol="JSCRIPT_METHOD_RUNTIME_TASK">
<opcodes>
<opcode name="MethodLoad" value="10" symbol="JSCRIPT_METHOD_METHODLOAD_OPCODE"/>
</opcodes>
</task>
</tasks>

<opcodes>
<opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/>
<opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/>
<opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/>
<opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/>
<opcode name="NODE_NET_SERVER_CONNECTION" value="14"/>
<opcode name="NODE_NET_STREAM_END" value="15"/>
<opcode name="NODE_GC_START" value="16"/>
<opcode name="NODE_GC_DONE" value="17"/>
<opcode name="NODE_V8SYMBOL_REMOVE" value="21"/>
<opcode name="NODE_V8SYMBOL_MOVE" value="22"/>
<opcode name="NODE_V8SYMBOL_RESET" value="23"/>
</opcodes>

<templates>
<template tid="node_connection">
<data name="fd" inType="win:UInt32"/>
<data name="port" inType="win:UInt32"/>
<data name="remote" inType="win:AnsiString"/>
<data name="buffered" inType="win:UInt32"/>
</template>

<template tid="node_http_client_request">
<data name="url" inType="win:AnsiString"/>
<data name="method" inType="win:AnsiString"/>
<data name="fd" inType="win:UInt32"/>
<data name="port" inType="win:UInt32"/>
<data name="remote" inType="win:AnsiString"/>
<data name="buffered" inType="win:UInt32"/>
</template>

<template tid="node_http_server_request">
<data name="url" inType="win:AnsiString"/>
<data name="method" inType="win:AnsiString"/>
<data name="forwardedFor" inType="win:AnsiString"/>
<data name="fd" inType="win:UInt32"/>
<data name="port" inType="win:UInt32"/>
<data name="remote" inType="win:AnsiString"/>
<data name="buffered" inType="win:UInt32"/>
</template>

<template tid="node_gc">
<data name="gctype" inType="win:UInt32"/>
<data name="gccallbackflags" inType="win:UInt32"/>
</template>

<template tid="V8AddressChange">
<data name="addr1" inType="win:Pointer" outType="win:HexInt64"/>
<data name="addr2" inType="win:Pointer" outType="win:HexInt64"/>
</template>

<template tid="MethodLoadUnload">
<data name="ScriptContextID" inType="win:Pointer" outType="win:HexInt64"/>
<data name="MethodStartAddress" inType="win:Pointer" outType="win:HexInt64"/>
<data name="MethodSize" inType="win:UInt64"/>
<data name="MethodID" inType="win:UInt32"/>
<data name="MethodFlags" inType="win:UInt16"/>
<data name="MethodAddressRangeID" inType="win:UInt16"/>
<data name="SourceID" inType="win:UInt64"/>
<data name="Line" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Column" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="MethodName" inType="win:UnicodeString" outType="xs:string"/>
</template>
</templates>

<events>
<event value="1" opcode="NODE_HTTP_SERVER_REQUEST" template="node_http_server_request" symbol="NODE_HTTP_SERVER_REQUEST_EVENT" message="$(string.NodeJS-ETW-provider.event.1.message)" level="win:Informational"/>
<event value="2" opcode="NODE_HTTP_SERVER_RESPONSE" template="node_connection" symbol="NODE_HTTP_SERVER_RESPONSE_EVENT" message="$(string.NodeJS-ETW-provider.event.2.message)" level="win:Informational"/>
<event value="3" opcode="NODE_HTTP_CLIENT_REQUEST" template="node_http_client_request" symbol="NODE_HTTP_CLIENT_REQUEST_EVENT" message="$(string.NodeJS-ETW-provider.event.3.message)" level="win:Informational"/>
<event value="4" opcode="NODE_HTTP_CLIENT_RESPONSE" template="node_connection" symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT" message="$(string.NodeJS-ETW-provider.event.4.message)" level="win:Informational"/>
<event value="5" opcode="NODE_NET_SERVER_CONNECTION" template="node_connection" symbol="NODE_NET_SERVER_CONNECTION_EVENT" message="$(string.NodeJS-ETW-provider.event.5.message)" level="win:Informational"/>
<event value="6" opcode="NODE_NET_STREAM_END" template="node_connection" symbol="NODE_NET_STREAM_END_EVENT" message="$(string.NodeJS-ETW-provider.event.6.message)" level="win:Informational"/>
<event value="7" opcode="NODE_GC_START" template="node_gc" symbol="NODE_GC_START_EVENT" message="$(string.NodeJS-ETW-provider.event.7.message)" level="win:Informational"/>
<event value="8" opcode="NODE_GC_DONE" template="node_gc" symbol="NODE_GC_DONE_EVENT" message="$(string.NodeJS-ETW-provider.event.8.message)" level="win:Informational"/>
<event value="9" level="win:Informational" opcode="MethodLoad" symbol="MethodLoad" message="$(string.NodeJS-ETW-provider.event.9.message)" task="MethodRuntime" template="MethodLoadUnload"/>
<event value="21" opcode="NODE_V8SYMBOL_REMOVE" template="V8AddressChange" symbol="NODE_V8SYMBOL_REMOVE_EVENT" message="$(string.NodeJS-ETW-provider.event.21.message)" level="win:Informational"/>
<event value="22" opcode="NODE_V8SYMBOL_MOVE" template="V8AddressChange" symbol="NODE_V8SYMBOL_MOVE_EVENT" message="$(string.NodeJS-ETW-provider.event.22.message)" level="win:Informational"/>
<event value="23" opcode="NODE_V8SYMBOL_RESET" symbol="NODE_V8SYMBOL_RESET_EVENT" message="$(string.NodeJS-ETW-provider.event.23.message)" level="win:Informational"/>
</events>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="en-US">
<stringTable>
<string id="NodeJS-ETW-provider.name" value="Node.js ETW Provider"/>
<string id="NodeJS-ETW-provider.event.1.message" value="Node.js HTTP Server Request%nMethod: %2%nRemote: %6%nPort: %5%nURL: %1"/>
<string id="NodeJS-ETW-provider.event.2.message" value="Node.js HTTP Server Response%nRemote: %3%nPort: %2"/>
<string id="NodeJS-ETW-provider.event.3.message" value="Node.js HTTP Client Request%nMethod: %2%nRemote: %5%nPort: %4%nURL: %1"/>
<string id="NodeJS-ETW-provider.event.4.message" value="Node.js HTTP Client Response%nRemote: %3%nPort: %2"/>
<string id="NodeJS-ETW-provider.event.5.message" value="Node.js Net Server Connection%nRemote: %3%nPort: %2"/>
<string id="NodeJS-ETW-provider.event.6.message" value="Node.js Net Stream End%nRemote: %3%nPort: %2"/>
<string id="NodeJS-ETW-provider.event.7.message" value="Node.js Garbage Collection Start"/>
<string id="NodeJS-ETW-provider.event.8.message" value="Node.js Garbage Collection Done"/>
<string id="NodeJS-ETW-provider.event.9.message" value="Node.js Function Compiled: %10"/>
<string id="NodeJS-ETW-provider.event.21.message" value="Node.js V8 Symbol Remove"/>
<string id="NodeJS-ETW-provider.event.22.message" value="Node.js V8 Symbol Move"/>
<string id="NodeJS-ETW-provider.event.23.message" value="Node.js V8 Symbol Reset"/>
</stringTable>
</resources>
</localization>
</instrumentationManifest>
24 changes: 24 additions & 0 deletions node/nodevars.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@echo off

rem Ensure this Node.js and npm are first in the PATH
set "PATH=%APPDATA%\npm;%~dp0;%PATH%"

setlocal enabledelayedexpansion
pushd "%~dp0"

rem Figure out the Node.js version.
set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'"
for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v

rem Print message.
if exist npm.cmd (
echo Your environment has been set up for using Node.js !version! and npm.
) else (
echo Your environment has been set up for using Node.js !version!.
)

popd
endlocal

rem If we're in the Node.js directory, change to the user's home dir.
if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%"
44 changes: 44 additions & 0 deletions node/npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix

basedir=`dirname "$0"`

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

NODE_EXE="$basedir/node.exe"
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE="$basedir/node"
fi
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi

# this path is passed to node.exe, so it needs to match whatever
# kind of paths Node.js thinks it's using, typically win32 paths.
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')"
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"

NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
if [ $? -ne 0 ]; then
# if this didn't work, then everything else below will fail
echo "Could not determine Node.js install directory" >&2
exit 1
fi
NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"

# a path that will fail -f test on any posix bash
NPM_WSL_PATH="/.."

# WSL can run Windows binaries, so we have to give it the win32 path
# however, WSL bash tests against posix paths, so we need to construct that
# to know if npm is installed globally.
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"`
fi
if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then
NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
fi

"$NODE_EXE" "$NPM_CLI_JS" "$@"
19 changes: 19 additions & 0 deletions node/npm.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:: Created by npm, please don't edit manually.
@ECHO OFF

SETLOCAL

SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)

SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
)
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
)

"%NODE_EXE%" "%NPM_CLI_JS%" %*
48 changes: 48 additions & 0 deletions node/npx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# This is used by the Node.js installer, which expects the cygwin/mingw
# shell script to already be present in the npm dependency folder.

(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix

basedir=`dirname "$0"`

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

NODE_EXE="$basedir/node.exe"
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE="$basedir/node"
fi
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi

# these paths are passed to node.exe, so they need to match whatever
# kind of paths Node.js thinks it's using, typically win32 paths.
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')"
if [ $? -ne 0 ]; then
# if this didn't work, then everything else below will fail
echo "Could not determine Node.js install directory" >&2
exit 1
fi
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js"
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"

# a path that will fail -f test on any posix bash
NPX_WSL_PATH="/.."

# WSL can run Windows binaries, so we have to give it the win32 path
# however, WSL bash tests against posix paths, so we need to construct that
# to know if npm is installed globally.
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
NPX_WSL_PATH=`wslpath "$NPM_PREFIX_NPX_CLI_JS"`
fi
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ] || [ -f "$NPX_WSL_PATH" ]; then
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
fi

"$NODE_EXE" "$NPX_CLI_JS" "$@"
20 changes: 20 additions & 0 deletions node/npx.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:: Created by npm, please don't edit manually.
@ECHO OFF

SETLOCAL

SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)

SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
)
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%"
)

"%NODE_EXE%" "%NPX_CLI_JS%" %*
25 changes: 25 additions & 0 deletions src/ideas/decorations/HidingDuck/idea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": "f7090c43-7-c94-4380-b9a4-2e7341008fa9",
"name": "HidingDuck",
"predecessor": "4bee8d89-9bb5-4238-8c83-95b098f88457",
"purpose": "exist, hiding duck",
"schema": [
{
"name": "position",
"type": "position"
},
{
"name": "rotation",
"type": "rotation"
},
{
"name": "scale",
"type": "scale"
},
{
"name": "distance",
"type": "radius"
}
],
"npm_dependencies": {}
}
Loading