Skip to content

Commit

Permalink
Add framework-tools and make everything build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Sep 22, 2024
1 parent 30333e0 commit 064ee11
Show file tree
Hide file tree
Showing 42 changed files with 4,981 additions and 7,912 deletions.
17 changes: 14 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# EditorConfig works out of the box with many editors, plugins are available
# for many others - see the website:
# https://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8

[*.{js,jsx,ts,tsx,graphql,sql,md,html,mjml,json,jsonc,json5,yml,yaml,template,sh,Dockerfile}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.{md,html,mjml}]
trim_trailing_whitespace = false

[Dockerfile]
indent_style = space
indent_size = 2
8 changes: 2 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',

// This one has to come last.
// See https://github.com/prettier/eslint-plugin-prettier#recommended-configuration.
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],

parser: '@typescript-eslint/parser',
Expand All @@ -21,8 +19,6 @@ module.exports = {
ignorePatterns: ['dist'],

rules: {
'prettier/prettier': 'warn',

'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
Expand Down
28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.1.cjs

This file was deleted.

12 changes: 5 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# `hardlinks-local` lets yarn use hardlinks to reduce disk space inside node_modules.
# See https://yarnpkg.com/configuration/yarnrc#nmMode.
compressionLevel: 0

enableGlobalCache: true

nmMode: hardlinks-local

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.5.1.cjs
preferInteractive: true
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"name": "@redwoodjs/auth-clerk",
"name": "@redwoodjs/auth-supabase",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"build": "yarn workspaces foreach --parallel run build",
"build": "yarn workspaces foreach --all --parallel run build",
"lint": "eslint packages",
"test": "yarn workspaces foreach --parallel run test"
"test": "yarn workspaces foreach --all --parallel run test"
},
"devDependencies": {
"@types/jest": "29.5.1",
"@typescript-eslint/eslint-plugin": "5.59.2",
"@typescript-eslint/parser": "5.59.2",
"eslint": "8.40.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"prettier": "2.8.8",
"typescript": "5.0.4"
"@types/jest": "29.5.13",
"@typescript-eslint/eslint-plugin": "8.5.0",
"@typescript-eslint/parser": "8.5.0",
"eslint": "8.57.0",
"prettier": "3.3.3",
"prettier-plugin-curly": "0.2.2",
"prettier-plugin-packagejson": "2.5.2",
"prettier-plugin-sh": "0.14.0",
"typescript": "5.6.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"npmClient": "yarn"
}
2 changes: 1 addition & 1 deletion packages/api/build.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { build } from '@redwoodjs/framework-tools'
import { build } from '@redwoodjs/auth-supabase-framework-tools'

await build()
2 changes: 1 addition & 1 deletion packages/api/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
"bytes": 1198
}
}
}
}
10 changes: 5 additions & 5 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@redwoodjs/auth-supabase-api",
"version": "8.0.0",
"version": "10.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/redwoodjs/redwood.git",
"directory": "packages/auth-providers/supabase/api"
"url": "git+https://github.com/redwoodjs/auth-supabase.git",
"directory": "packages/api"
},
"license": "MIT",
"type": "commonjs",
Expand Down Expand Up @@ -39,13 +39,13 @@
"test:watch": "vitest watch"
},
"dependencies": {
"@redwoodjs/api": "workspace:*",
"@redwoodjs/api": "8.2.0",
"@supabase/ssr": "0.5.1",
"jsonwebtoken": "9.0.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "0.16.4",
"@redwoodjs/framework-tools": "workspace:*",
"@redwoodjs/auth-supabase-framework-tools": "workspace:*",
"@types/aws-lambda": "8.10.145",
"@types/jsonwebtoken": "9.0.6",
"concurrently": "8.2.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.compilerOption.json",
"extends": "../../tsconfig.compilerOptions.json",
"compilerOptions": {
"strict": true,
"rootDir": "src",
Expand All @@ -8,6 +8,5 @@
"moduleResolution": "Node16",
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"
},
"include": ["src"],
"references": [{ "path": "../../../api" }]
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/api/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/framework-tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Framework Tools

Tooling used internally by the Redwood framework.
This package isn't published to NPM.
8 changes: 8 additions & 0 deletions packages/framework-tools/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { build, defaultBuildOptions } from './src/buildDefaults'

await build({
buildOptions: {
...defaultBuildOptions,
format: 'esm',
},
})
165 changes: 165 additions & 0 deletions packages/framework-tools/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"inputs": {
"src/attw.ts": {
"bytes": 1723,
"imports": [],
"format": "esm"
},
"src/buildDefaults.ts": {
"bytes": 3902,
"imports": [],
"format": "esm"
},
"src/generateTypes.ts": {
"bytes": 2132,
"imports": [],
"format": "esm"
},
"src/bins/rw-fwtools-attw.ts": {
"bytes": 411,
"imports": [],
"format": "esm"
}
},
"outputs": {
"dist/attw.js": {
"imports": [
{
"path": "node:child_process",
"kind": "import-statement",
"external": true
},
{
"path": "node:fs",
"kind": "import-statement",
"external": true
},
{
"path": "node:module",
"kind": "import-statement",
"external": true
},
{
"path": "node:path",
"kind": "import-statement",
"external": true
}
],
"exports": [
"attw"
],
"entryPoint": "src/attw.ts",
"inputs": {
"src/attw.ts": {
"bytesInOutput": 1157
}
},
"bytes": 1176
},
"dist/buildDefaults.js": {
"imports": [
{
"path": "node:fs",
"kind": "import-statement",
"external": true
},
{
"path": "node:path",
"kind": "import-statement",
"external": true
},
{
"path": "node:url",
"kind": "import-statement",
"external": true
},
{
"path": "esbuild",
"kind": "import-statement",
"external": true
},
{
"path": "fast-glob",
"kind": "import-statement",
"external": true
}
],
"exports": [
"build",
"buildCjs",
"buildEsm",
"buildExternalCjs",
"buildExternalEsm",
"copyAssets",
"defaultBuildOptions",
"defaultIgnorePatterns",
"defaultPatterns"
],
"entryPoint": "src/buildDefaults.ts",
"inputs": {
"src/buildDefaults.ts": {
"bytesInOutput": 3225
}
},
"bytes": 3390
},
"dist/generateTypes.js": {
"imports": [
{
"path": "node:fs",
"kind": "import-statement",
"external": true
},
{
"path": "node:path",
"kind": "import-statement",
"external": true
},
{
"path": "node:url",
"kind": "import-statement",
"external": true
},
{
"path": "zx",
"kind": "import-statement",
"external": true
}
],
"exports": [
"generateTypesCjs",
"generateTypesEsm",
"insertCommonJsPackageJson"
],
"entryPoint": "src/generateTypes.ts",
"inputs": {
"src/generateTypes.ts": {
"bytesInOutput": 1173
}
},
"bytes": 1253
},
"dist/bins/rw-fwtools-attw.js": {
"imports": [
{
"path": "node:process",
"kind": "import-statement",
"external": true
},
{
"path": "../attw.js",
"kind": "import-statement",
"external": true
}
],
"exports": [],
"entryPoint": "src/bins/rw-fwtools-attw.ts",
"inputs": {
"src/bins/rw-fwtools-attw.ts": {
"bytesInOutput": 416
}
},
"bytes": 416
}
}
}
45 changes: 45 additions & 0 deletions packages/framework-tools/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@redwoodjs/auth-supabase-framework-tools",
"version": "10.0.0",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/redwoodjs/auth-supabase.git",
"directory": "packages/framework-tools"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./dist/buildDefaults.d.ts",
"default": "./dist/buildDefaults.js"
},
"./generateTypes": {
"types": "./dist/generateTypes.d.ts",
"default": "./dist/generateTypes.js"
}
},
"types": "./dist/buildDefaults.d.ts",
"bin": {
"rw-fwtools-attw": "./dist/bins/rw-fwtools-attw.js"
},
"files": [
"dist"
],
"scripts": {
"build": "tsx ./build.ts && run build:types",
"build:types": "tsc --build --verbose"
},
"dependencies": {
"@arethetypeswrong/cli": "0.16.4",
"esbuild": "0.23.1",
"fast-glob": "3.3.2",
"zx": "8.1.6"
},
"devDependencies": {
"tsx": "4.19.1",
"type-fest": "4.26.1",
"typescript": "5.6.2"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
Loading

0 comments on commit 064ee11

Please sign in to comment.