@reactful/create 0.0.58 → 0.0.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/index.js +2 -14
  2. package/package.json +3 -4
  3. package/bun.lockb +0 -0
  4. package/common/package.json +0 -22
  5. package/common/tsconfig.json +0 -24
  6. package/templates/empty/index.html +0 -12
  7. package/templates/empty/index.ts +0 -5
  8. package/templates/minimal/index.html +0 -12
  9. package/templates/minimal/index.ts +0 -5
  10. package/templates/sampling/apis/auth/db.ts +0 -15
  11. package/templates/sampling/apis/auth/index.ts +0 -28
  12. package/templates/sampling/apis/hello.ts +0 -3
  13. package/templates/sampling/apis/quotes.ts +0 -16
  14. package/templates/sampling/apis/sub/index.ts +0 -3
  15. package/templates/sampling/apis/sub/sub.ts +0 -3
  16. package/templates/sampling/assets/SLIDEME.png +0 -0
  17. package/templates/sampling/assets/default.css +0 -91
  18. package/templates/sampling/assets/favicon.ico +0 -0
  19. package/templates/sampling/assets/icon.png +0 -0
  20. package/templates/sampling/assets/icon.svg +0 -6
  21. package/templates/sampling/assets/logo-144.png +0 -0
  22. package/templates/sampling/assets/logo-168.png +0 -0
  23. package/templates/sampling/assets/logo-192.png +0 -0
  24. package/templates/sampling/assets/logo-48.png +0 -0
  25. package/templates/sampling/assets/logo-512.png +0 -0
  26. package/templates/sampling/assets/logo-72.png +0 -0
  27. package/templates/sampling/assets/logo-96.png +0 -0
  28. package/templates/sampling/assets/manifest.json +0 -57
  29. package/templates/sampling/assets/markdown.css +0 -274
  30. package/templates/sampling/assets/robots.txt +0 -1
  31. package/templates/sampling/assets/system.css +0 -7
  32. package/templates/sampling/builds/about.html +0 -27
  33. package/templates/sampling/builds/bundle.js +0 -13116
  34. package/templates/sampling/builds/bundle.ts +0 -25
  35. package/templates/sampling/builds/client.ts +0 -1
  36. package/templates/sampling/builds/clock.html +0 -30
  37. package/templates/sampling/builds/counter.html +0 -30
  38. package/templates/sampling/builds/forms/form.html +0 -48
  39. package/templates/sampling/builds/forms/index.html +0 -48
  40. package/templates/sampling/builds/hello.html +0 -60
  41. package/templates/sampling/builds/htmlx.html +0 -24
  42. package/templates/sampling/builds/htmlx.tsx +0 -13
  43. package/templates/sampling/builds/index.html +0 -98
  44. package/templates/sampling/builds/login.html +0 -45
  45. package/templates/sampling/builds/profile/index.html +0 -54
  46. package/templates/sampling/builds/quotes.html +0 -26
  47. package/templates/sampling/builds/shared.js +0 -76
  48. package/templates/sampling/builds/system.html +0 -27
  49. package/templates/sampling/components/header.tsx +0 -7
  50. package/templates/sampling/directives/index.ts +0 -1
  51. package/templates/sampling/directives/shown.ts +0 -6
  52. package/templates/sampling/index.html +0 -20
  53. package/templates/sampling/index.ts +0 -19
  54. package/templates/sampling/routes/about.html +0 -13
  55. package/templates/sampling/routes/clock.tsx +0 -35
  56. package/templates/sampling/routes/counter.tsx +0 -21
  57. package/templates/sampling/routes/forms/form.css +0 -19
  58. package/templates/sampling/routes/forms/form.tsx +0 -51
  59. package/templates/sampling/routes/forms/index.tsx +0 -3
  60. package/templates/sampling/routes/hello.tsx +0 -62
  61. package/templates/sampling/routes/htmlx.html +0 -15
  62. package/templates/sampling/routes/index.md +0 -15
  63. package/templates/sampling/routes/login.tsx +0 -36
  64. package/templates/sampling/routes/profile/detail.css +0 -13
  65. package/templates/sampling/routes/profile/detail.tsx +0 -48
  66. package/templates/sampling/routes/profile/index.tsx +0 -14
  67. package/templates/sampling/routes/profile/profile.css +0 -8
  68. package/templates/sampling/routes/profile/tester.tsx +0 -11
  69. package/templates/sampling/routes/quotes.tsx +0 -25
  70. package/templates/sampling/routes/system.tsx +0 -23
  71. package/templates/sampling/tests/access.spec.ts +0 -29
  72. package/templates/sampling/tests/counter.spec.ts +0 -19
  73. package/templates/sampling/tests/form.spec.ts +0 -51
  74. package/templates/sampling/tests/hello.spec.ts +0 -25
  75. package/templates/sampling/tests/path.test.ts +0 -20
  76. package/tsconfig.json +0 -22
@@ -1,23 +0,0 @@
1
- import OS from "os"
2
- import React from "react"
3
- import { seo, style } from '@reactful/web'
4
-
5
- const metatags: MetaTags = {
6
- charset:"UTF-16",
7
- rating:"general",
8
- keywords:"hello, hi"
9
- }
10
-
11
- //@ts-ignore
12
- @seo('System', metatags)
13
- @style('/assets/system.css')
14
- export default function System() {
15
- const [ type, arch, release ] = [OS.type(), OS.arch(), OS.release()]
16
-
17
- return <>
18
- <h1>Server OS</h1>
19
- <h2>server side information</h2>
20
- <pre>{type} | {arch} | {release} </pre>
21
- <section shown={false}>DONT SHOW ME!</section>
22
- </>
23
- }
@@ -1,29 +0,0 @@
1
- import { test, expect } from '@playwright/test'
2
-
3
- const cases = [
4
- ['/about', 'About'],
5
- ['/clock', 'World Clock'],
6
- ['/htmlx', 'HTML-X'],
7
- ['/system', 'Server OS'],
8
- ['/quotes', 'My custom error component', 'Philosophy quote of the day'],
9
- ['/counter', 'Counter'],
10
- ['/hello', 'Hello Forms'],
11
- ['/forms', 'Uncontrolled Components'],
12
- ['/profile/123', 'Profile'],
13
- ]
14
-
15
- cases.forEach(function(scenario) {
16
- const [ href, head, that ] = scenario
17
-
18
- test(href, async ({ page }) => {
19
- await page.goto('http://localhost:3000/')
20
- await page.goto(href)
21
- await page.waitForTimeout(333)
22
- await page.waitForURL(`http://localhost:3000${href}`);
23
-
24
- const h1 = await page.locator(`h1`).innerHTML()
25
- const ok = [head,that].includes(h1)
26
-
27
- if (!ok) expect(h1).toBe(that || head)
28
- })
29
- })
@@ -1,19 +0,0 @@
1
- import { test, expect } from '@playwright/test'
2
-
3
- test('counter: statefull props', async ({ page }) => {
4
- await page.goto('http://localhost:3000/counter')
5
- await page.waitForTimeout(99)
6
- await page.click('button', { delay:99 })
7
- await page.click('button', { delay:99 })
8
- await page.click('button', { delay:99 })
9
- await page.waitForTimeout(99)
10
-
11
- const btn = await page.locator('button').innerText()
12
- expect(btn.trim()).toBe('COUNTED: 3')
13
- })
14
-
15
- test('counter: shown custom props directive', async ({ page }) => {
16
- await page.goto('http://localhost:3000/counter')
17
- const h2IsVisible = await page.locator('h6').isVisible()
18
- expect(h2IsVisible).toBe(false)
19
- })
@@ -1,51 +0,0 @@
1
- // import { test, expect } from '@playwright/test'
2
-
3
- // async function goto(page) {
4
- // await page.goto('http://localhost:3000/forms')
5
- // await page.waitForTimeout(1500)
6
- // }
7
-
8
- // test(`form validation: checkbox`, async function({ page }) {
9
- // await goto(page)
10
- // await page.click('button', { delay:333 })
11
-
12
- // const check = await page.locator('[type="checkbox"]')
13
- // const checkHandle = await check!.evaluateHandle(x => x['validationMessage'])
14
- // const validationMessage = await checkHandle.jsonValue()
15
-
16
- // expect(validationMessage).toBe('Please check this box if you want to proceed')
17
- // })
18
-
19
- // test(`form validation: input`, async function({ page }) {
20
- // await goto(page)
21
- // await page.click('[uid="14"]')
22
- // await page.click('button', { delay:333 })
23
-
24
- // const input = await page.evaluate(() => document.querySelector('[bind="mode"]'))
25
- // const validationMessage = input && input['validationMessage']
26
-
27
- // // const input = await page.$('[bind="mode"]');
28
- // // const inputHandle = await input!.evaluateHandle(x => x['validationMessage'])
29
- // // const validationMessage = await inputHandle.jsonValue()
30
-
31
- // expect(validationMessage).toBe('Mode is required!')
32
- // })
33
-
34
- // test(`form action: errors feedback`, async function({ page }) {
35
- // await goto(page)
36
-
37
- // const checkbox = await page.getByLabel('Accepted?')
38
- // await checkbox.click()
39
-
40
- // await page.getByLabel('Accepted?').click()
41
- // await page.fill('[bind="mode"]', 'ok', { timeout:99 })
42
- // await page.click('button', { delay:333 })
43
-
44
- // const progress = await page.locator('progress').isVisible()
45
- // expect(progress).toBe(true)
46
-
47
- // await page.waitForTimeout(333)
48
-
49
- // const li = await page.locator('ul > li').innerHTML()
50
- // expect(li).toContain('URL not found')
51
- // })
@@ -1,25 +0,0 @@
1
- import { test, expect } from '@playwright/test'
2
-
3
- const cases = [
4
- ['local', 'hi!', '[id="1"]', '#l1'],
5
- ['global (outer)', 'hi!', '[id="2"]', '#l2'],
6
- ['global (inner)', 'hi!', '[id="3"]', '#l2'],
7
- ]
8
-
9
- cases.forEach(function(scenario) {
10
- const [ scope, text, inputId, labelId ] = scenario
11
-
12
- test(`hello: ${scope} props binding`, async function({ page }) {
13
- await page.goto('http://localhost:3000/hello')
14
- await page.waitForTimeout(99)
15
-
16
- for await (const char of text.split('')) {
17
- await page.waitForTimeout(99)
18
- await page.type(inputId, char, { delay: 99 })
19
- }
20
-
21
- await page.waitForTimeout(99)
22
- const result = await page.locator(labelId).innerText()
23
- expect(result).toBe(text)
24
- })
25
- })
@@ -1,20 +0,0 @@
1
- import { test, expect } from 'bun:test'
2
-
3
- const scenarios = [
4
- ['url', '/routes', '/'],
5
- ['sub url', '/routes/sub', '/sub'],
6
- ['http', 'http://domain.com/routes', '/'],
7
- ['https', 'https://domain.com/routes', '/'],
8
- ['https port', 'https://domain.com:3000/routes', '/'],
9
- ['https port file', 'https://domain.com:3000/routes/file.tsx', '/file'],
10
- ['https port index', 'https://domain.com:3000/routes/index', '/'],
11
- ['https port sub file', 'https://domain.com:3000/routes/sub/file.tsx', '/sub/file'],
12
- ]
13
-
14
- scenarios.forEach(function([ scenario, sampling, expected ]) {
15
- test(`new Path(url).href: ${scenario}`, function() {
16
- const resulted = new URL(sampling).pathname
17
- expect(resulted).toBe(expected as any)
18
- // console.log('sampling:', sampling)
19
- })
20
- })
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "exclude": ["node_modules"],
3
- "compilerOptions": {
4
- "types": ["bun-types"],
5
- "module": "esnext",
6
- "target": "esnext",
7
- "moduleDetection": "auto",
8
- "moduleResolution": "bundler",
9
- "noEmit": true,
10
- "strict": true,
11
- "allowJs": true,
12
- "composite": true,
13
- "declaration": true,
14
- "skipLibCheck": true,
15
- "noImplicitAny": false,
16
- "esModuleInterop": true,
17
- "downlevelIteration": true,
18
- "allowImportingTsExtensions": true,
19
- "allowSyntheticDefaultImports": true,
20
- "forceConsistentCasingInFileNames": true
21
- }
22
- }