package-installer-cli 1.3.3 → 1.4.1

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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/dist/commands/email.js +1150 -0
  3. data/dist/email-templates/bugReport.js +108 -0
  4. data/dist/email-templates/collectors/bugReport.js +41 -0
  5. data/dist/email-templates/collectors/common.js +56 -0
  6. data/dist/email-templates/collectors/customMessage.js +48 -0
  7. data/dist/email-templates/collectors/docs.js +41 -0
  8. data/dist/email-templates/collectors/featureRequest.js +47 -0
  9. data/dist/email-templates/collectors/improvement.js +52 -0
  10. data/dist/email-templates/collectors/index.js +9 -0
  11. data/dist/email-templates/collectors/question.js +31 -0
  12. data/dist/email-templates/collectors/templateRequest.js +53 -0
  13. data/dist/email-templates/customMessage.js +135 -0
  14. data/dist/email-templates/docs.js +111 -0
  15. data/dist/email-templates/featureRequest.js +111 -0
  16. data/dist/email-templates/generator.js +67 -0
  17. data/dist/email-templates/improvement.js +121 -0
  18. data/dist/email-templates/index.js +15 -0
  19. data/dist/email-templates/question.js +101 -0
  20. data/dist/email-templates/styles.js +168 -0
  21. data/dist/email-templates/templateRequest.js +120 -0
  22. data/dist/email-templates/testEmail.js +56 -0
  23. data/dist/email-templates/types.js +1 -0
  24. data/dist/index.js +29 -1
  25. data/dist/utils/featureInstaller.js +4 -11
  26. data/features/ai/ai.json +547 -0
  27. data/features/analytics/analytics.json +4 -0
  28. data/features/auth/auth.json +473 -0
  29. data/features/auth/auth0/django/backend/apiexample/urls.py +10 -0
  30. data/features/auth/auth0/django/backend/apiexample/validator.py +21 -0
  31. data/features/auth/auth0/django/backend/apiexample/views.py +30 -0
  32. data/features/auth/auth0/django/backend/requirements.txt +4 -0
  33. data/features/auth/auth0/django/web-app/requirements.txt +4 -0
  34. data/features/auth/auth0/django/web-app/webappexample/settings.py +28 -0
  35. data/features/auth/auth0/django/web-app/webappexample/templates/index.html +16 -0
  36. data/features/auth/auth0/django/web-app/webappexample/urls.py +10 -0
  37. data/features/auth/auth0/django/web-app/webappexample/views.py +52 -0
  38. data/features/auth/auth0/go/backend/go.mod +8 -0
  39. data/features/auth/auth0/go/backend/main.go +60 -0
  40. data/features/auth/auth0/go/backend/middleware/jwt.go +81 -0
  41. data/features/auth/auth0/go/web-app/auth.go +56 -0
  42. data/features/auth/auth0/go/web-app/callback.go +52 -0
  43. data/features/auth/auth0/go/web-app/go.mod +11 -0
  44. data/features/auth/auth0/go/web-app/isAuthenticated.go +20 -0
  45. data/features/auth/auth0/go/web-app/login.go +47 -0
  46. data/features/auth/auth0/go/web-app/logout.go +38 -0
  47. data/features/auth/auth0/go/web-app/main.go +31 -0
  48. data/features/auth/auth0/go/web-app/router.go +44 -0
  49. data/features/auth/auth0/go/web-app/user.go +18 -0
  50. data/features/auth/auth0/ruby-on-rails/backend/Gemfile +1 -0
  51. data/features/auth/auth0/ruby-on-rails/backend/app/controllers/application_controller.rb +5 -0
  52. data/features/auth/auth0/ruby-on-rails/backend/app/controllers/concern/secured.rb +60 -0
  53. data/features/auth/auth0/ruby-on-rails/backend/app/controllers/private_controller.rb +6 -0
  54. data/features/auth/auth0/ruby-on-rails/backend/app/controllers/public-controller.rb +6 -0
  55. data/features/auth/auth0/ruby-on-rails/backend/app/lib/auth0_client.rb +59 -0
  56. data/features/auth/auth0/ruby-on-rails/web-app/Gemfile +2 -0
  57. data/features/auth/auth0/ruby-on-rails/web-app/auth0_controller.rb +41 -0
  58. data/features/auth/auth0/ruby-on-rails/web-app/config/auth0.yml +4 -0
  59. data/features/auth/auth0/ruby-on-rails/web-app/config/initializers/auth0.rb +14 -0
  60. data/features/auth/auth0/ruby-on-rails/web-app/config/routes.rb +6 -0
  61. data/features/auth/auth0/ruby-on-rails/web-app/config/secured.rb +11 -0
  62. data/features/auth/clerk/go/clerk_client.go +28 -0
  63. data/features/auth/clerk/go/go.mod +5 -0
  64. data/features/auth/clerk/go/main.go +82 -0
  65. data/features/auth/clerk/nextjs/typescript/app/layout.tsx +2 -2
  66. data/features/auth/clerk/ruby-on-rails/Gemfile +1 -0
  67. data/features/auth/clerk/ruby-on-rails/app.rb +50 -0
  68. data/features/auth/clerk/ruby-on-rails/config/initializers/clerk.rb +4 -0
  69. data/features/aws/aws.json +5207 -0
  70. data/features/database/database.json +246 -0
  71. data/features/docker/docker.json +108 -0
  72. data/features/features.json +44 -7321
  73. data/features/gitignore/gitignore.json +61 -0
  74. data/features/monitoring/monitoring.json +5 -0
  75. data/features/payment/payment.json +347 -0
  76. data/features/storage/storage.json +371 -0
  77. data/features/testing/jest/angularjs/typescript/tests/angularjs.test.ts +12 -0
  78. data/features/testing/jest/expressjs/javascript/tests/expressjs.test.js +10 -0
  79. data/features/testing/jest/expressjs/typescript/tests/expressjs.test.ts +10 -0
  80. data/features/testing/jest/nestjs/typescript/tests/nestjs.test.ts +10 -0
  81. data/features/testing/jest/nextjs/javascript/tests/nextjs.test.js +10 -0
  82. data/features/testing/jest/nextjs/typescript/tests/nextjs.test.ts +10 -0
  83. data/features/testing/jest/nuxtjs/typescript/tests/nuxtjs.test.ts +9 -0
  84. data/features/testing/jest/reactjs/javascript/tests/reactjs.test.js +10 -0
  85. data/features/testing/jest/reactjs/typescript/tests/reactjs.test.ts +10 -0
  86. data/features/testing/jest/reactjs-expressjs-shadcn/javascript/tests/reactjs.expressjs.shadcn.test.js +16 -0
  87. data/features/testing/jest/reactjs-expressjs-shadcn/typescript/tests/reactjs.expressjs.shadcn.test.ts +16 -0
  88. data/features/testing/jest/reactjs-nestjs-shadcn/typescript/tests/reactjs.nestjs.shadcn.test.ts +14 -0
  89. data/features/testing/jest/remixjs/typescript/tests/remixjs.test.ts +9 -0
  90. data/features/testing/jest/vuejs/javascript/tests/vuejs.test.ts +9 -0
  91. data/features/testing/jest/vuejs/typescript/tests/vuejs.test.ts +9 -0
  92. data/features/testing/testing.json +102 -0
  93. data/features/ui/ui.json +91 -0
  94. metadata +90 -8
  95. data/features/testing/jest/angularjs/tests/angularjs.test.js +0 -12
  96. data/features/testing/jest/expressjs/tests/javascript/expressjs.test.js +0 -12
  97. data/features/testing/jest/expressjs/tests/typescript/expressjs.test.ts +0 -12
  98. data/features/testing/jest/go/tests/go.test.js +0 -12
  99. data/features/testing/jest/nextjs/tests/javascript/nextjs.test.js +0 -12
  100. data/features/testing/jest/nextjs/tests/typescript/nextjs.test.ts +0 -12
@@ -0,0 +1,6 @@
1
+ Rails.application.routes.draw do
2
+ # . .
3
+ get '/auth/auth0/callback' => 'auth0#callback'
4
+ get '/auth/failure' => 'auth0#failure'
5
+ get '/auth/logout' => 'auth0#logout'
6
+ end
@@ -0,0 +1,11 @@
1
+ module Secured
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ before_action :logged_in_using_omniauth?
6
+ end
7
+
8
+ def logged_in_using_omniauth?
9
+ redirect_to '/' unless session[:userinfo].present?
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "os"
6
+
7
+ "github.com/clerk/clerk-sdk-go/v2"
8
+ )
9
+
10
+ var clerkClient *clerk.Client
11
+
12
+ func initClerk() error {
13
+ secretKey := os.Getenv("CLERK_SECRET_KEY")
14
+ if secretKey == "" {
15
+ return fmt.Errorf("CLERK_SECRET_KEY not set")
16
+ }
17
+ client, err := clerk.NewClient(secretKey)
18
+ if err != nil {
19
+ return err
20
+ }
21
+ clerkClient = client
22
+ return nil
23
+ }
24
+
25
+ // Use this to get the client in other parts
26
+ func getClerkClient() *clerk.Client {
27
+ return clerkClient
28
+ }
@@ -0,0 +1,5 @@
1
+ module github.com/yourusername/my-go-app
2
+
3
+ go 1.21
4
+
5
+ require github.com/clerk/clerk-sdk-go/v2 v2.x.x
@@ -0,0 +1,82 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "log"
7
+ "net/http"
8
+
9
+ "github.com/clerk/clerk-sdk-go/v2"
10
+ clerkhttp "github.com/clerk/clerk-sdk-go/v2/http"
11
+ "github.com/clerk/clerk-sdk-go/v2/organization"
12
+ "github.com/clerk/clerk-sdk-go/v2/organizationmembership"
13
+ "github.com/clerk/clerk-sdk-go/v2/user"
14
+ )
15
+
16
+ func main() {
17
+ // initialize Clerk
18
+ if err := initClerk(); err != nil {
19
+ log.Fatalf("failed to init Clerk: %v", err)
20
+ }
21
+
22
+ ctx := context.Background()
23
+
24
+ // Example: create an organization
25
+ org, err := organization.Create(ctx, &organization.CreateParams{
26
+ Name: clerk.String("My Org Name"),
27
+ })
28
+ if err != nil {
29
+ log.Fatalf("organization create failed: %v", err)
30
+ }
31
+ fmt.Printf("Created organization: %+v\n", org)
32
+
33
+ // Update organization slug
34
+ updated, err := organization.Update(ctx, org.ID, &organization.UpdateParams{
35
+ Slug: clerk.String("my-org-slug"),
36
+ })
37
+ if err != nil {
38
+ log.Fatalf("organization update failed: %v", err)
39
+ }
40
+ fmt.Printf("Updated org slug: %+v\n", updated)
41
+
42
+ // List org memberships
43
+ listParams := organizationmembership.ListParams{
44
+ Limit: clerk.Int64(10),
45
+ }
46
+ memberships, err := organizationmembership.List(ctx, &listParams)
47
+ if err != nil {
48
+ log.Fatalf("list memberships failed: %v", err)
49
+ }
50
+ if len(memberships) > 0 {
51
+ m := memberships[0]
52
+ // fetch user details
53
+ usr, err := user.Get(ctx, m.UserID)
54
+ if err != nil {
55
+ log.Fatalf("user.Get failed: %v", err)
56
+ }
57
+ fmt.Printf("User from membership: %+v\n", usr)
58
+ }
59
+
60
+ // HTTP server with a protected endpoint
61
+ mux := http.NewServeMux()
62
+ mux.HandleFunc("/public", func(w http.ResponseWriter, r *http.Request) {
63
+ w.Write([]byte("This is public"))
64
+ })
65
+ // Protected route
66
+ protected := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
67
+ claims, ok := clerk.SessionClaimsFromContext(r.Context())
68
+ if !ok {
69
+ w.WriteHeader(http.StatusUnauthorized)
70
+ w.Write([]byte("No valid session"))
71
+ return
72
+ }
73
+ w.Write([]byte(fmt.Sprintf("Hello user %s", claims.Subject)))
74
+ })
75
+
76
+ // Wrap with authorization middleware (checks header bearer token)
77
+ mux.Handle("/protected", clerkhttp.RequireHeaderAuthorization()(protected))
78
+
79
+ addr := ":8080"
80
+ fmt.Printf("Starting server at %s\n", addr)
81
+ http.ListenAndServe(addr, mux)
82
+ }
@@ -21,8 +21,8 @@ const geistMono = Geist_Mono({
21
21
  })
22
22
 
23
23
  export const metadata: Metadata = {
24
- title: {templateTitle},
25
- description: {templateDescription},
24
+ title: "Clerk Authentication",
25
+ description: "Generated by PACKAGE INSTALLER CLI",
26
26
  }
27
27
 
28
28
  export default function RootLayout({
@@ -0,0 +1 @@
1
+ gem 'clerk-sdk-ruby', require: "clerk"
@@ -0,0 +1,50 @@
1
+ require "clerk"
2
+
3
+ # make sure config setup code has run (see previous step)
4
+
5
+ sdk = Clerk::SDK.new
6
+
7
+ # Create a user
8
+ create_user_request = Clerk::SDK::CreateUserRequest.new(
9
+ first_name: "John",
10
+ last_name: "Doe",
11
+ email_address: ["john.doe@example.com"],
12
+ password: "password"
13
+ )
14
+
15
+ user = sdk.users.create(create_user_request)
16
+
17
+ # List users
18
+ user_list = sdk.users.get_user_list(limit: 1)
19
+ first_user = user_list.first
20
+
21
+ # Lock that user
22
+ sdk.users.lock_user(first_user["id"])
23
+
24
+ # Unlock the user
25
+ sdk.users.unlock_user(first_user["id"])
26
+
27
+ require_relative "clerk_setup"
28
+ require "clerk"
29
+
30
+ sdk = Clerk::SDK.new
31
+
32
+ create_user_req = Clerk::SDK::CreateUserRequest.new(
33
+ first_name: "Alice",
34
+ last_name: "Smith",
35
+ email_address: ["alice@example.com"],
36
+ password: "securepassword"
37
+ )
38
+
39
+ user = sdk.users.create(create_user_req)
40
+ puts "Created user: #{user}"
41
+
42
+ users = sdk.users.get_user_list(limit: 5)
43
+ puts "User list: #{users}"
44
+
45
+ if (u = users.first)
46
+ sdk.users.lock_user(u["id"])
47
+ puts "Locked user #{u['id']}"
48
+ sdk.users.unlock_user(u["id"])
49
+ puts "Unlocked user #{u['id']}"
50
+ end
@@ -0,0 +1,4 @@
1
+ Clerk.configure do |c|
2
+ c.secret_key = ENV["CLERK_SECRET_KEY"] # or "your_secret_key"
3
+ c.logger = Logger.new(STDOUT) # optional, gives you logs
4
+ end