lovdacn 0.0.1 → 0.0.3
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/README.md +72 -106
- package/dist/index.d.ts +1 -0
- package/dist/index.js +224 -0
- package/package.json +41 -63
- package/templates/nativewind/.vscode/extensions.json +1 -0
- package/templates/nativewind/.vscode/settings.json +7 -0
- package/templates/nativewind/AGENTS.md +3 -0
- package/templates/nativewind/CLAUDE.md +1 -0
- package/{LICENSE → templates/nativewind/LICENSE} +21 -21
- package/templates/nativewind/README.md +56 -0
- package/templates/nativewind/app.json +43 -0
- package/templates/nativewind/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/nativewind/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/nativewind/assets/expo.icon/icon.json +40 -0
- package/templates/nativewind/assets/images/android-icon-background.png +0 -0
- package/templates/nativewind/assets/images/android-icon-foreground.png +0 -0
- package/templates/nativewind/assets/images/android-icon-monochrome.png +0 -0
- package/templates/nativewind/assets/images/expo-badge-white.png +0 -0
- package/templates/nativewind/assets/images/expo-badge.png +0 -0
- package/templates/nativewind/assets/images/expo-logo.png +0 -0
- package/templates/nativewind/assets/images/favicon.png +0 -0
- package/templates/nativewind/assets/images/icon.png +0 -0
- package/templates/nativewind/assets/images/logo-glow.png +0 -0
- package/templates/nativewind/assets/images/react-logo.png +0 -0
- package/templates/nativewind/assets/images/react-logo@2x.png +0 -0
- package/templates/nativewind/assets/images/react-logo@3x.png +0 -0
- package/templates/nativewind/assets/images/splash-icon.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/explore.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/explore@2x.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/explore@3x.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/home.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/home@2x.png +0 -0
- package/templates/nativewind/assets/images/tabIcons/home@3x.png +0 -0
- package/templates/nativewind/assets/images/tutorial-web.png +0 -0
- package/templates/nativewind/babel.config.js +9 -0
- package/templates/nativewind/expo-env.d.ts +3 -0
- package/templates/nativewind/lvcn.json +16 -0
- package/templates/nativewind/metro.config.js +6 -0
- package/templates/nativewind/nativewind-env.d.ts +3 -0
- package/templates/nativewind/package.json +55 -0
- package/templates/nativewind/postcss.config.js +6 -0
- package/templates/nativewind/scripts/reset-project.js +114 -0
- package/templates/nativewind/src/app/_layout.tsx +25 -0
- package/templates/nativewind/src/app/explore.tsx +180 -0
- package/templates/nativewind/src/app/index.tsx +12 -0
- package/templates/nativewind/src/components/animated-icon.module.css +6 -0
- package/templates/nativewind/src/components/animated-icon.tsx +148 -0
- package/templates/nativewind/src/components/animated-icon.web.tsx +108 -0
- package/templates/nativewind/src/components/app-tabs.tsx +32 -0
- package/templates/nativewind/src/components/app-tabs.web.tsx +115 -0
- package/templates/nativewind/src/components/external-link.tsx +25 -0
- package/templates/nativewind/src/components/hint-row.tsx +35 -0
- package/templates/nativewind/src/components/themed-text.tsx +73 -0
- package/templates/nativewind/src/components/themed-view.tsx +16 -0
- package/templates/nativewind/src/components/ui/button.tsx +106 -0
- package/templates/nativewind/src/components/ui/collapsible.tsx +65 -0
- package/templates/nativewind/src/components/ui/text.tsx +89 -0
- package/templates/nativewind/src/components/web-badge.tsx +43 -0
- package/templates/nativewind/src/constants/theme.ts +65 -0
- package/templates/nativewind/src/global.css +13 -0
- package/templates/nativewind/src/hooks/use-color-scheme.ts +1 -0
- package/templates/nativewind/src/hooks/use-color-scheme.web.ts +21 -0
- package/templates/nativewind/src/hooks/use-theme.ts +14 -0
- package/templates/nativewind/tailwind.config.js +86 -0
- package/templates/nativewind/tsconfig.json +21 -0
- package/templates/uniwind/.claude/settings.json +5 -0
- package/templates/uniwind/.vscode/extensions.json +1 -0
- package/templates/uniwind/.vscode/settings.json +7 -0
- package/templates/uniwind/AGENTS.md +3 -0
- package/templates/uniwind/CLAUDE.md +1 -0
- package/templates/uniwind/LICENSE +21 -0
- package/templates/uniwind/README.md +56 -0
- package/templates/uniwind/app.json +42 -0
- package/templates/uniwind/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/uniwind/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/uniwind/assets/expo.icon/icon.json +40 -0
- package/templates/uniwind/assets/images/android-icon-background.png +0 -0
- package/templates/uniwind/assets/images/android-icon-foreground.png +0 -0
- package/templates/uniwind/assets/images/android-icon-monochrome.png +0 -0
- package/templates/uniwind/assets/images/expo-badge-white.png +0 -0
- package/templates/uniwind/assets/images/expo-badge.png +0 -0
- package/templates/uniwind/assets/images/expo-logo.png +0 -0
- package/templates/uniwind/assets/images/favicon.png +0 -0
- package/templates/uniwind/assets/images/icon.png +0 -0
- package/templates/uniwind/assets/images/logo-glow.png +0 -0
- package/templates/uniwind/assets/images/react-logo.png +0 -0
- package/templates/uniwind/assets/images/react-logo@2x.png +0 -0
- package/templates/uniwind/assets/images/react-logo@3x.png +0 -0
- package/templates/uniwind/assets/images/splash-icon.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/explore.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/explore@2x.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/explore@3x.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/home.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/home@2x.png +0 -0
- package/templates/uniwind/assets/images/tabIcons/home@3x.png +0 -0
- package/templates/uniwind/assets/images/tutorial-web.png +0 -0
- package/templates/uniwind/expo-env.d.ts +3 -0
- package/templates/uniwind/lvcn.json +16 -0
- package/templates/uniwind/metro.config.js +14 -0
- package/templates/uniwind/package.json +46 -0
- package/templates/uniwind/scripts/reset-project.js +114 -0
- package/templates/uniwind/src/app/_layout.tsx +23 -0
- package/templates/uniwind/src/app/explore.tsx +180 -0
- package/templates/uniwind/src/app/index.tsx +98 -0
- package/templates/uniwind/src/components/animated-icon.module.css +6 -0
- package/templates/uniwind/src/components/animated-icon.tsx +148 -0
- package/templates/uniwind/src/components/animated-icon.web.tsx +108 -0
- package/templates/uniwind/src/components/app-tabs.tsx +32 -0
- package/templates/uniwind/src/components/app-tabs.web.tsx +115 -0
- package/templates/uniwind/src/components/external-link.tsx +25 -0
- package/templates/uniwind/src/components/hint-row.tsx +35 -0
- package/templates/uniwind/src/components/themed-text.tsx +73 -0
- package/templates/uniwind/src/components/themed-view.tsx +16 -0
- package/templates/uniwind/src/components/ui/collapsible.tsx +65 -0
- package/templates/uniwind/src/components/web-badge.tsx +43 -0
- package/templates/uniwind/src/constants/theme.ts +65 -0
- package/templates/uniwind/src/global.css +12 -0
- package/templates/uniwind/src/hooks/use-color-scheme.ts +1 -0
- package/templates/uniwind/src/hooks/use-color-scheme.web.ts +21 -0
- package/templates/uniwind/src/hooks/use-theme.ts +14 -0
- package/templates/uniwind/src/uniwind-types.d.ts +10 -0
- package/templates/uniwind/tsconfig.json +20 -0
- package/.changeset/config.json +0 -17
- package/.github/actions/setup/action.yml +0 -21
- package/.github/workflows/check.yml +0 -54
- package/.github/workflows/release.yml +0 -0
- package/.github/workflows/snapshot.yml +0 -24
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +0 -6
- package/.vscode/settings.json +0 -46
- package/eslint.config.mjs +0 -118
- package/patches/@changesets__get-github-info@0.6.0.patch +0 -48
- package/scripts/copy-package-json.ts +0 -35
- package/src/bin.ts +0 -18
- package/src/cli.ts +0 -66
- package/src/contexts/cli-options.ts +0 -29
- package/src/project-manifest.ts +0 -370
- package/src/services/commands/add.ts +0 -128
- package/src/services/commands/doctor.ts +0 -287
- package/src/services/commands/init.ts +0 -94
- package/src/services/git.ts +0 -39
- package/src/services/package-manager.ts +0 -48
- package/src/services/project-config.ts +0 -295
- package/src/services/required-files-checker.ts +0 -375
- package/src/services/spinner.ts +0 -15
- package/src/services/template.ts +0 -223
- package/src/utils/retry-with.ts +0 -9
- package/src/utils/run-command.ts +0 -10
- package/test/Dummy.test.ts +0 -7
- package/tsconfig.base.json +0 -53
- package/tsconfig.json +0 -14
- package/tsconfig.scripts.json +0 -17
- package/tsconfig.src.json +0 -10
- package/tsconfig.test.json +0 -10
- package/tsup.config.ts +0 -9
- package/vitest.config.ts +0 -12
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SymbolView } from 'expo-symbols';
|
|
2
|
+
import { PropsWithChildren, useState } from 'react';
|
|
3
|
+
import { Pressable, StyleSheet } from 'react-native';
|
|
4
|
+
import Animated, { FadeIn } from 'react-native-reanimated';
|
|
5
|
+
|
|
6
|
+
import { ThemedText } from '@/components/themed-text';
|
|
7
|
+
import { ThemedView } from '@/components/themed-view';
|
|
8
|
+
import { Spacing } from '@/constants/theme';
|
|
9
|
+
import { useTheme } from '@/hooks/use-theme';
|
|
10
|
+
|
|
11
|
+
export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
|
|
12
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<ThemedView>
|
|
17
|
+
<Pressable
|
|
18
|
+
style={({ pressed }) => [styles.heading, pressed && styles.pressedHeading]}
|
|
19
|
+
onPress={() => setIsOpen((value) => !value)}>
|
|
20
|
+
<ThemedView type="backgroundElement" style={styles.button}>
|
|
21
|
+
<SymbolView
|
|
22
|
+
name={{ ios: 'chevron.right', android: 'chevron_right', web: 'chevron_right' }}
|
|
23
|
+
size={14}
|
|
24
|
+
weight="bold"
|
|
25
|
+
tintColor={theme.text}
|
|
26
|
+
style={{ transform: [{ rotate: isOpen ? '-90deg' : '90deg' }] }}
|
|
27
|
+
/>
|
|
28
|
+
</ThemedView>
|
|
29
|
+
|
|
30
|
+
<ThemedText type="small">{title}</ThemedText>
|
|
31
|
+
</Pressable>
|
|
32
|
+
{isOpen && (
|
|
33
|
+
<Animated.View entering={FadeIn.duration(200)}>
|
|
34
|
+
<ThemedView type="backgroundElement" style={styles.content}>
|
|
35
|
+
{children}
|
|
36
|
+
</ThemedView>
|
|
37
|
+
</Animated.View>
|
|
38
|
+
)}
|
|
39
|
+
</ThemedView>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
heading: {
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
gap: Spacing.two,
|
|
48
|
+
},
|
|
49
|
+
pressedHeading: {
|
|
50
|
+
opacity: 0.7,
|
|
51
|
+
},
|
|
52
|
+
button: {
|
|
53
|
+
width: Spacing.four,
|
|
54
|
+
height: Spacing.four,
|
|
55
|
+
borderRadius: 12,
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
},
|
|
59
|
+
content: {
|
|
60
|
+
marginTop: Spacing.three,
|
|
61
|
+
borderRadius: Spacing.three,
|
|
62
|
+
marginLeft: Spacing.four,
|
|
63
|
+
padding: Spacing.four,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { version } from 'expo/package.json';
|
|
2
|
+
import { Image } from 'expo-image';
|
|
3
|
+
import { useColorScheme, StyleSheet } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { ThemedText } from './themed-text';
|
|
6
|
+
import { ThemedView } from './themed-view';
|
|
7
|
+
|
|
8
|
+
import { Spacing } from '@/constants/theme';
|
|
9
|
+
|
|
10
|
+
export function WebBadge() {
|
|
11
|
+
const scheme = useColorScheme();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<ThemedView style={styles.container}>
|
|
15
|
+
<ThemedText type="code" themeColor="textSecondary" style={styles.versionText}>
|
|
16
|
+
v{version}
|
|
17
|
+
</ThemedText>
|
|
18
|
+
<Image
|
|
19
|
+
source={
|
|
20
|
+
scheme === 'dark'
|
|
21
|
+
? require('@/assets/images/expo-badge-white.png')
|
|
22
|
+
: require('@/assets/images/expo-badge.png')
|
|
23
|
+
}
|
|
24
|
+
style={styles.badgeImage}
|
|
25
|
+
/>
|
|
26
|
+
</ThemedView>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
container: {
|
|
32
|
+
padding: Spacing.five,
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
gap: Spacing.two,
|
|
35
|
+
},
|
|
36
|
+
versionText: {
|
|
37
|
+
textAlign: 'center',
|
|
38
|
+
},
|
|
39
|
+
badgeImage: {
|
|
40
|
+
width: 123,
|
|
41
|
+
aspectRatio: 123 / 24,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Below are the colors that are used in the app. The colors are defined in the light and dark mode.
|
|
3
|
+
* There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import '@/global.css';
|
|
7
|
+
|
|
8
|
+
import { Platform } from 'react-native';
|
|
9
|
+
|
|
10
|
+
export const Colors = {
|
|
11
|
+
light: {
|
|
12
|
+
text: '#000000',
|
|
13
|
+
background: '#ffffff',
|
|
14
|
+
backgroundElement: '#F0F0F3',
|
|
15
|
+
backgroundSelected: '#E0E1E6',
|
|
16
|
+
textSecondary: '#60646C',
|
|
17
|
+
},
|
|
18
|
+
dark: {
|
|
19
|
+
text: '#ffffff',
|
|
20
|
+
background: '#000000',
|
|
21
|
+
backgroundElement: '#212225',
|
|
22
|
+
backgroundSelected: '#2E3135',
|
|
23
|
+
textSecondary: '#B0B4BA',
|
|
24
|
+
},
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
27
|
+
export type ThemeColor = keyof typeof Colors.light & keyof typeof Colors.dark;
|
|
28
|
+
|
|
29
|
+
export const Fonts = Platform.select({
|
|
30
|
+
ios: {
|
|
31
|
+
/** iOS `UIFontDescriptorSystemDesignDefault` */
|
|
32
|
+
sans: 'system-ui',
|
|
33
|
+
/** iOS `UIFontDescriptorSystemDesignSerif` */
|
|
34
|
+
serif: 'ui-serif',
|
|
35
|
+
/** iOS `UIFontDescriptorSystemDesignRounded` */
|
|
36
|
+
rounded: 'ui-rounded',
|
|
37
|
+
/** iOS `UIFontDescriptorSystemDesignMonospaced` */
|
|
38
|
+
mono: 'ui-monospace',
|
|
39
|
+
},
|
|
40
|
+
default: {
|
|
41
|
+
sans: 'normal',
|
|
42
|
+
serif: 'serif',
|
|
43
|
+
rounded: 'normal',
|
|
44
|
+
mono: 'monospace',
|
|
45
|
+
},
|
|
46
|
+
web: {
|
|
47
|
+
sans: 'var(--font-display)',
|
|
48
|
+
serif: 'var(--font-serif)',
|
|
49
|
+
rounded: 'var(--font-rounded)',
|
|
50
|
+
mono: 'var(--font-mono)',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const Spacing = {
|
|
55
|
+
half: 2,
|
|
56
|
+
one: 4,
|
|
57
|
+
two: 8,
|
|
58
|
+
three: 16,
|
|
59
|
+
four: 24,
|
|
60
|
+
five: 32,
|
|
61
|
+
six: 64,
|
|
62
|
+
} as const;
|
|
63
|
+
|
|
64
|
+
export const BottomTabInset = Platform.select({ ios: 50, android: 80 }) ?? 0;
|
|
65
|
+
export const MaxContentWidth = 800;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "uniwind";
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--font-display:
|
|
6
|
+
Spline Sans, Inter, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji,
|
|
7
|
+
Segoe UI Symbol, Noto Color Emoji;
|
|
8
|
+
--font-mono:
|
|
9
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
|
|
10
|
+
--font-rounded: 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Meiryo, 'MS PGothic', sans-serif;
|
|
11
|
+
--font-serif: Georgia, 'Times New Roman', serif;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useColorScheme } from 'react-native';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useColorScheme as useRNColorScheme } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* To support static rendering, this value needs to be re-calculated on the client side for web
|
|
6
|
+
*/
|
|
7
|
+
export function useColorScheme() {
|
|
8
|
+
const [hasHydrated, setHasHydrated] = useState(false);
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setHasHydrated(true);
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
const colorScheme = useRNColorScheme();
|
|
15
|
+
|
|
16
|
+
if (hasHydrated) {
|
|
17
|
+
return colorScheme;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return 'light';
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Learn more about light and dark modes:
|
|
3
|
+
* https://docs.expo.dev/guides/color-schemes/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Colors } from '@/constants/theme';
|
|
7
|
+
import { useColorScheme } from '@/hooks/use-color-scheme';
|
|
8
|
+
|
|
9
|
+
export function useTheme() {
|
|
10
|
+
const scheme = useColorScheme();
|
|
11
|
+
const theme = scheme === 'unspecified' ? 'light' : scheme;
|
|
12
|
+
|
|
13
|
+
return Colors[theme];
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"strict": true,
|
|
5
|
+
"paths": {
|
|
6
|
+
"@/*": [
|
|
7
|
+
"./src/*"
|
|
8
|
+
],
|
|
9
|
+
"@/assets/*": [
|
|
10
|
+
"./assets/*"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"include": [
|
|
15
|
+
"**/*.ts",
|
|
16
|
+
"**/*.tsx",
|
|
17
|
+
".expo/types/**/*.ts",
|
|
18
|
+
"expo-env.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.changeset/config.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
|
|
3
|
-
"changelog": [
|
|
4
|
-
"@changesets/changelog-github",
|
|
5
|
-
{
|
|
6
|
-
"repo": "entangle-labs/lavdacn"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"commit": false,
|
|
10
|
-
"fixed": [],
|
|
11
|
-
"linked": [],
|
|
12
|
-
"access": "restricted",
|
|
13
|
-
"baseBranch": "main",
|
|
14
|
-
"updateInternalDependencies": "patch",
|
|
15
|
-
"ignore": []
|
|
16
|
-
}
|
|
17
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Setup
|
|
2
|
-
description: Perform standard setup and install dependencies using pnpm.
|
|
3
|
-
inputs:
|
|
4
|
-
node-version:
|
|
5
|
-
description: The version of Node.js to install
|
|
6
|
-
required: true
|
|
7
|
-
default: 20.16.0
|
|
8
|
-
|
|
9
|
-
runs:
|
|
10
|
-
using: composite
|
|
11
|
-
steps:
|
|
12
|
-
- name: Install pnpm
|
|
13
|
-
uses: pnpm/action-setup@v3
|
|
14
|
-
- name: Install node
|
|
15
|
-
uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
cache: pnpm
|
|
18
|
-
node-version: ${{ inputs.node-version }}
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
shell: bash
|
|
21
|
-
run: pnpm install
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: Check
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
pull_request:
|
|
6
|
-
branches: [main]
|
|
7
|
-
push:
|
|
8
|
-
branches: [main]
|
|
9
|
-
|
|
10
|
-
concurrency:
|
|
11
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
-
cancel-in-progress: true
|
|
13
|
-
|
|
14
|
-
permissions: {}
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
build:
|
|
18
|
-
name: Build
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
timeout-minutes: 10
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v4
|
|
23
|
-
- name: Install dependencies
|
|
24
|
-
uses: ./.github/actions/setup
|
|
25
|
-
|
|
26
|
-
types:
|
|
27
|
-
name: Types
|
|
28
|
-
runs-on: ubuntu-latest
|
|
29
|
-
timeout-minutes: 10
|
|
30
|
-
steps:
|
|
31
|
-
- uses: actions/checkout@v4
|
|
32
|
-
- name: Install dependencies
|
|
33
|
-
uses: ./.github/actions/setup
|
|
34
|
-
- run: pnpm check
|
|
35
|
-
|
|
36
|
-
lint:
|
|
37
|
-
name: Lint
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
timeout-minutes: 10
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/checkout@v4
|
|
42
|
-
- name: Install dependencies
|
|
43
|
-
uses: ./.github/actions/setup
|
|
44
|
-
- run: pnpm lint
|
|
45
|
-
|
|
46
|
-
test:
|
|
47
|
-
name: Test
|
|
48
|
-
runs-on: ubuntu-latest
|
|
49
|
-
timeout-minutes: 10
|
|
50
|
-
steps:
|
|
51
|
-
- uses: actions/checkout@v4
|
|
52
|
-
- name: Install dependencies
|
|
53
|
-
uses: ./.github/actions/setup
|
|
54
|
-
- run: pnpm test
|
|
File without changes
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: Snapshot
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main, next-minor, next-major]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
permissions: {}
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
snapshot:
|
|
12
|
-
name: Snapshot
|
|
13
|
-
if: github.repository_owner == 'Effect-Ts'
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
timeout-minutes: 10
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v4
|
|
18
|
-
- name: Install dependencies
|
|
19
|
-
uses: ./.github/actions/setup
|
|
20
|
-
- name: Build package
|
|
21
|
-
run: pnpm build
|
|
22
|
-
- name: Create snapshot
|
|
23
|
-
id: snapshot
|
|
24
|
-
run: pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
|
package/.prettierrc
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
-
"typescript.preferences.importModuleSpecifier": "relative",
|
|
4
|
-
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
5
|
-
"editor.formatOnSave": true,
|
|
6
|
-
"eslint.format.enable": true,
|
|
7
|
-
"[json]": {
|
|
8
|
-
"editor.defaultFormatter": "vscode.json-language-features"
|
|
9
|
-
},
|
|
10
|
-
"[markdown]": {
|
|
11
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
12
|
-
"prettier.semi": false,
|
|
13
|
-
"prettier.trailingComma": "none"
|
|
14
|
-
},
|
|
15
|
-
"[javascript]": {
|
|
16
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
17
|
-
},
|
|
18
|
-
"[javascriptreact]": {
|
|
19
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
20
|
-
},
|
|
21
|
-
"[typescript]": {
|
|
22
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
23
|
-
},
|
|
24
|
-
"[typescriptreact]": {
|
|
25
|
-
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
26
|
-
},
|
|
27
|
-
"eslint.validate": ["markdown", "javascript", "typescript"],
|
|
28
|
-
"editor.codeActionsOnSave": {
|
|
29
|
-
"source.fixAll.eslint": "explicit"
|
|
30
|
-
},
|
|
31
|
-
"editor.quickSuggestions": {
|
|
32
|
-
"other": true,
|
|
33
|
-
"comments": false,
|
|
34
|
-
"strings": false
|
|
35
|
-
},
|
|
36
|
-
"editor.acceptSuggestionOnCommitCharacter": true,
|
|
37
|
-
"editor.acceptSuggestionOnEnter": "on",
|
|
38
|
-
"editor.quickSuggestionsDelay": 10,
|
|
39
|
-
"editor.suggestOnTriggerCharacters": true,
|
|
40
|
-
"editor.tabCompletion": "off",
|
|
41
|
-
"editor.suggest.localityBonus": true,
|
|
42
|
-
"editor.suggestSelection": "recentlyUsed",
|
|
43
|
-
"editor.wordBasedSuggestions": "matchingDocuments",
|
|
44
|
-
"editor.parameterHints.enabled": true,
|
|
45
|
-
"files.insertFinalNewline": true
|
|
46
|
-
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { fixupPluginRules } from "@eslint/compat"
|
|
2
|
-
import { FlatCompat } from "@eslint/eslintrc"
|
|
3
|
-
import js from "@eslint/js"
|
|
4
|
-
import tsParser from "@typescript-eslint/parser"
|
|
5
|
-
import codegen from "eslint-plugin-codegen"
|
|
6
|
-
import _import from "eslint-plugin-import"
|
|
7
|
-
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
|
8
|
-
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
|
|
9
|
-
import path from "node:path"
|
|
10
|
-
import { fileURLToPath } from "node:url"
|
|
11
|
-
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
13
|
-
const __dirname = path.dirname(__filename)
|
|
14
|
-
const compat = new FlatCompat({
|
|
15
|
-
baseDirectory: __dirname,
|
|
16
|
-
recommendedConfig: js.configs.recommended,
|
|
17
|
-
allConfig: js.configs.all
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
export default [
|
|
21
|
-
{
|
|
22
|
-
ignores: ["**/dist", "**/build", "**/docs", "**/*.md"]
|
|
23
|
-
},
|
|
24
|
-
...compat.extends(
|
|
25
|
-
"eslint:recommended",
|
|
26
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
27
|
-
"plugin:@typescript-eslint/recommended",
|
|
28
|
-
"plugin:@effect/recommended"
|
|
29
|
-
),
|
|
30
|
-
{
|
|
31
|
-
plugins: {
|
|
32
|
-
import: fixupPluginRules(_import),
|
|
33
|
-
"sort-destructure-keys": sortDestructureKeys,
|
|
34
|
-
"simple-import-sort": simpleImportSort,
|
|
35
|
-
codegen
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
languageOptions: {
|
|
39
|
-
parser: tsParser,
|
|
40
|
-
ecmaVersion: 2018,
|
|
41
|
-
sourceType: "module"
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
settings: {
|
|
45
|
-
"import/parsers": {
|
|
46
|
-
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
"import/resolver": {
|
|
50
|
-
typescript: {
|
|
51
|
-
alwaysTryTypes: true
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
rules: {
|
|
57
|
-
"codegen/codegen": "error",
|
|
58
|
-
"no-fallthrough": "off",
|
|
59
|
-
"no-irregular-whitespace": "off",
|
|
60
|
-
"object-shorthand": "error",
|
|
61
|
-
"prefer-destructuring": "off",
|
|
62
|
-
"sort-imports": "off",
|
|
63
|
-
|
|
64
|
-
"no-restricted-syntax": [
|
|
65
|
-
"error",
|
|
66
|
-
{
|
|
67
|
-
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
|
|
68
|
-
message: "Do not use spread arguments in Array.push"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
|
|
72
|
-
"no-unused-vars": "off",
|
|
73
|
-
"prefer-rest-params": "off",
|
|
74
|
-
"prefer-spread": "off",
|
|
75
|
-
"import/first": "error",
|
|
76
|
-
"import/newline-after-import": "error",
|
|
77
|
-
"import/no-duplicates": "error",
|
|
78
|
-
"import/no-unresolved": "off",
|
|
79
|
-
"import/order": "off",
|
|
80
|
-
"simple-import-sort/imports": "off",
|
|
81
|
-
"sort-destructure-keys/sort-destructure-keys": "error",
|
|
82
|
-
"deprecation/deprecation": "off",
|
|
83
|
-
|
|
84
|
-
"@typescript-eslint/array-type": [
|
|
85
|
-
"warn",
|
|
86
|
-
{
|
|
87
|
-
default: "generic",
|
|
88
|
-
readonly: "generic"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
"@typescript-eslint/member-delimiter-style": 0,
|
|
93
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
94
|
-
"@typescript-eslint/ban-types": "off",
|
|
95
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
96
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
97
|
-
"@typescript-eslint/consistent-type-imports": "warn",
|
|
98
|
-
|
|
99
|
-
"@typescript-eslint/no-unused-vars": [
|
|
100
|
-
"error",
|
|
101
|
-
{
|
|
102
|
-
argsIgnorePattern: "^_",
|
|
103
|
-
varsIgnorePattern: "^_"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
|
|
107
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
108
|
-
"@typescript-eslint/camelcase": "off",
|
|
109
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
110
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
111
|
-
"@typescript-eslint/interface-name-prefix": "off",
|
|
112
|
-
"@typescript-eslint/no-array-constructor": "off",
|
|
113
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
114
|
-
"@typescript-eslint/no-namespace": "off",
|
|
115
|
-
"@effect/dprint": "off"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
]
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
diff --git a/dist/changesets-get-github-info.cjs.js b/dist/changesets-get-github-info.cjs.js
|
|
2
|
-
index a74df59f8a5988f458a3476087399f5e6dfe4818..ce5e60ef9916eb0cb76ab1e9dd422abcad752bf6 100644
|
|
3
|
-
--- a/dist/changesets-get-github-info.cjs.js
|
|
4
|
-
+++ b/dist/changesets-get-github-info.cjs.js
|
|
5
|
-
@@ -251,18 +251,13 @@ async function getInfo(request) {
|
|
6
|
-
b = new Date(b.mergedAt);
|
|
7
|
-
return a > b ? 1 : a < b ? -1 : 0;
|
|
8
|
-
})[0] : null;
|
|
9
|
-
-
|
|
10
|
-
- if (associatedPullRequest) {
|
|
11
|
-
- user = associatedPullRequest.author;
|
|
12
|
-
- }
|
|
13
|
-
-
|
|
14
|
-
return {
|
|
15
|
-
user: user ? user.login : null,
|
|
16
|
-
pull: associatedPullRequest ? associatedPullRequest.number : null,
|
|
17
|
-
links: {
|
|
18
|
-
commit: `[\`${request.commit.slice(0, 7)}\`](${data.commitUrl})`,
|
|
19
|
-
pull: associatedPullRequest ? `[#${associatedPullRequest.number}](${associatedPullRequest.url})` : null,
|
|
20
|
-
- user: user ? `[@${user.login}](${user.url})` : null
|
|
21
|
-
+ user: user ? `@${user.login}` : null
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
diff --git a/dist/changesets-get-github-info.esm.js b/dist/changesets-get-github-info.esm.js
|
|
26
|
-
index 27e5c972ab1202ff16f5124b471f4bbcc46be2b5..3940a8fe86e10cb46d8ff6436dea1103b1839927 100644
|
|
27
|
-
--- a/dist/changesets-get-github-info.esm.js
|
|
28
|
-
+++ b/dist/changesets-get-github-info.esm.js
|
|
29
|
-
@@ -242,18 +242,13 @@ async function getInfo(request) {
|
|
30
|
-
b = new Date(b.mergedAt);
|
|
31
|
-
return a > b ? 1 : a < b ? -1 : 0;
|
|
32
|
-
})[0] : null;
|
|
33
|
-
-
|
|
34
|
-
- if (associatedPullRequest) {
|
|
35
|
-
- user = associatedPullRequest.author;
|
|
36
|
-
- }
|
|
37
|
-
-
|
|
38
|
-
return {
|
|
39
|
-
user: user ? user.login : null,
|
|
40
|
-
pull: associatedPullRequest ? associatedPullRequest.number : null,
|
|
41
|
-
links: {
|
|
42
|
-
commit: `[\`${request.commit.slice(0, 7)}\`](${data.commitUrl})`,
|
|
43
|
-
pull: associatedPullRequest ? `[#${associatedPullRequest.number}](${associatedPullRequest.url})` : null,
|
|
44
|
-
- user: user ? `[@${user.login}](${user.url})` : null
|
|
45
|
-
+ user: user ? `@${user.login}` : null
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { FileSystem, Path } from "@effect/platform"
|
|
2
|
-
import { NodeContext } from "@effect/platform-node"
|
|
3
|
-
import { Effect } from "effect"
|
|
4
|
-
|
|
5
|
-
const program = Effect.gen(function* () {
|
|
6
|
-
const fs = yield* FileSystem.FileSystem
|
|
7
|
-
const path = yield* Path.Path
|
|
8
|
-
yield* Effect.log("[Build] Copying package.json ...")
|
|
9
|
-
const json: any = yield* fs.readFileString("package.json").pipe(Effect.map(JSON.parse))
|
|
10
|
-
const pkg = {
|
|
11
|
-
name: json.name,
|
|
12
|
-
version: json.version,
|
|
13
|
-
type: json.type,
|
|
14
|
-
description: json.description,
|
|
15
|
-
main: "bin.cjs",
|
|
16
|
-
bin: {
|
|
17
|
-
lavdacn: "bin.cjs",
|
|
18
|
-
lvcn: "bin.cjs"
|
|
19
|
-
},
|
|
20
|
-
engines: json.engines,
|
|
21
|
-
dependencies: json.dependencies,
|
|
22
|
-
peerDependencies: json.peerDependencies,
|
|
23
|
-
repository: json.repository,
|
|
24
|
-
author: json.author,
|
|
25
|
-
license: json.license,
|
|
26
|
-
bugs: json.bugs,
|
|
27
|
-
homepage: json.homepage,
|
|
28
|
-
tags: json.tags,
|
|
29
|
-
keywords: json.keywords
|
|
30
|
-
}
|
|
31
|
-
yield* fs.writeFileString(path.join("dist", "package.json"), JSON.stringify(pkg, null, 2))
|
|
32
|
-
yield* Effect.log("[Build] Build completed.")
|
|
33
|
-
}).pipe(Effect.provide(NodeContext.layer))
|
|
34
|
-
|
|
35
|
-
Effect.runPromise(program).catch(console.error)
|
package/src/bin.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import * as NodeContext from "@effect/platform-node/NodeContext"
|
|
4
|
-
import * as NodeRuntime from "@effect/platform-node/NodeRuntime"
|
|
5
|
-
import * as Effect from "effect/Effect"
|
|
6
|
-
import * as Cli from "./cli.js"
|
|
7
|
-
|
|
8
|
-
Effect.suspend(Cli.run).pipe(
|
|
9
|
-
Effect.provide(NodeContext.layer),
|
|
10
|
-
Effect.catchAll((error) => {
|
|
11
|
-
if (error instanceof Error) {
|
|
12
|
-
Effect.logDebug(error)
|
|
13
|
-
return Effect.logError(error.message)
|
|
14
|
-
}
|
|
15
|
-
return Effect.logError(error)
|
|
16
|
-
}),
|
|
17
|
-
NodeRuntime.runMain({ disableErrorReporting: true })
|
|
18
|
-
)
|